11
如何强制一个浮动DIV匹配另一个浮动DIV的高度?
我的HTML代码只是将页面分为两列,分别为65%,35%。 <div style="float : left; width :65%; height:auto;background-color:#FDD017;"> <div id="response"> </div> </div> <div style="float : left; width :35%;height:auto; background-color:#FDD017;"> <div id="note"> </div> </div> 在中response div,我有可变数据;在中note div,我有固定数据。即使两个div具有两个不同的数据集,我仍需要它们以相同的高度显示,以便背景色看起来好像填充了包含两者的框。当然,问题出在response div,因为其高度取决于当前显示在其中的数据量。 如何确保两列的高度始终相等?