Home >Web Front-end >HTML Tutorial >Fixed height div, automatically increases with content css definition method_html/css_WEB-ITnose

Fixed height div, automatically increases with content css definition method_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 12:27:531528browse

*{ font-size:12px; margin:0; padding:0;}
Method 1:
#testBox{border:1px solid #cccccc;padding:5px;width :220px;
min-height:100px; /*The minimum height value is set to: 100px*/
height:auto !important; /*Compatible with FF, IE7 also supports the !important tag*/
height: 100px; /*Compatible with ie6*/
Method 2:
/*This method can also be used alone*/
height:expression(this.height < 100 ? "100px" : this.height "px");




< meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Untitled Document






  • Here is the height of each record. . . . .







Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn