我想通过使用javscript设置一个元素的高度为另一个高度,我试过使用jquery height()方法,但它不工作,因为其中一个元素的高度设置为auto :如何获得高度为:auto的元素的高度?
#content
{
background-color:#F2F2F2;
width:1000px;
margin:0px auto;
text-align:left;
min-height:900px;
height:auto;
border-top:5px solid #032F76;
border-bottom:5px solid #032F76;
overflow:auto;
}
那么有什么简单的方法来获取高度设置为自动的元素的高度?
你是在谈论块本身的高度或其内容的高度? – 2012-02-25 22:35:38