我无法让自动高度适用于 FF 或 Chrome。它在 IE 中运行良好,但在 FF 和 Chrome 中,它基本上使 div 的高度与页面本身一样多,即使内容没有填充元素。它只会在实际内容下留下一个巨大的空白区域。
<center>
<div id = "choosearea">
<div id = "logbar">
<div id = "logbartext">Choose Your Area
</div>
<div id = "log">
<a href = "?action=home">Home</a>
<a href = "?action=logout&NOHEADERS=1">Log Out</a>
</div>
</div>
<div id = "header">
<div id = "ss_logo">
<img src="http://i1157.photobucket.com/albums/p595/Gamethefirst/ssnewbanner1.png">
</div>
<div id = "area">Serving:<br><u>SouthWest Ohio<br>Northern Kentucky<br>SouthEast Indiana</u>
</div>
</div>
<center>
<div id = "menu">
</div>
</center>
<div width = "100%" align = "center">
<div id = "paddingbox">
<div id = "chooseareatext">
<p>Choose the area which you reside from the options below in order to post/view your ad.</p>
<ul class = "bullets">
<li><a href = "?board=swohio">SouthWest Ohio</a></li>
<li><a href = "?board=nk">Northern Kentucky</a></li>
<li><a href = "?board=indi">SouthEast Indiana</a></li>
</ul>
</div>
<div id = "affs">
<h3>Need Supplies? Get Great Deals From Our Friends!</h3>
</div>
</div>
</div>
</div>
</center>
样式表
#choosearea {
height: auto;
}