我有两个DIV,.sidebar和.content,我想设置.sidebar与.content保持相同的高度.
我尝试过以下操作:
$(".sidebar").css({'height':($(".content").height()+'px'}); $(".sidebar").height($(".content").height()); var highestCol = Math.max($('.sidebar').height(),$('.content').height()); $('.sidebar').height(highestCol);@H_404_5@这些都没有工作.对于.content,我没有任何高度,因为根据内容会增加或减少.
请帮帮我.我今天要完成一个网页,这个(简单的)事情让我头痛.
谢谢!