If you want to set the div adaptive height, we can adopt height:auto; This property, but this property IE6 is not supported. Does it have a headache? In fact, it is not difficult to solve this problem, but also a lot of methods, here is recommended a: (assuming we need to control the div minimum height is 100px, more than let the information inside automatically open):
- . div{
- Height:auto!important;
- Height:100px;
- Min-height:100px;
- }
Note: Because!important in IE7 and Firefox can read, and the weight is higher than the back of the height:100px, so when the IE7 and Firefox display, will use the previous height:auto!important; And IE6 can not recognize!important,auto to it, so it will apply the style of the following height:100px, and min-height:100px that the div minimum height is 100px; This property is recognized in both IE7 and Firefox.
Excerpt from: http://www.phpshuo.com/show/13_40.html
About the HTML front-end setting of an adaptive height div problem