The minimum height can be set a box of the minimum height, when its content less time, can also keep box height is certain, beyond the automatic downward extension, but so far, only opera and Mozilla support, IE7 began to support, but IE7 in the test phase, Such official version of the release to the popularization of a period of time may be longer, unless the MS bundled it on an operating system, how on the existing basis (IE6 80-90%), reasonable, the minimum height of the magical?
Assuming there are two box, we need it with a minimum height of 150PX.
Css:
div.box1,div.box2{
width:300px;
min-height:150px;
background:#EEE;
float:left;
margin-right:20px;
}
Xhtml:
<div>IE中没保持最小高度为150px</div>
<div>最小高度可以设定一个BOX的最小高度,
当其内容较少时时,也能保持BOX的高度为一定</div>
Now the effect, ie did not maintain a minimum height of 150px. The solution is to set a height for IE.
* html div.box1,* html div.box2{height: 150px;}
You can also use the CSS Property selector (attribute selectors)
div.box1,div.box2{......height:150px;}
/*IE靠这保持最小高度,超出就自动向下延伸*/
div[class].box1,div[class].box2{height:auto;}
/*具有类选择符(class)属性的DIV对象*/
IE is not supported by nature, Opera and Mozilla support, read this height. Applicable occasions: Search, articles and other pages (not using 100% height, when the content of the search is less, not too short page.)