HTML and CSS Reference
In-Depth Information
Compatibility
CSS 2, 3 IE 7+
Netscape 6+, Firefox 1+ Opera 7+, Safari 1+
Note
• While in many cases max-width has not been deemed as important as min-width ,
it is quite useful to constrain large regions of text from having overly long lines,
which can result in readability problems.
min-height
This property defines the minimum height a region may reduce to if it is relatively sized
and the browser window is adjusted.
Syntax
min-height: length | percentage | inherit
where the value of length is generally a measurement using a fixed value (for example,
100px ). Percentages also may be used for relative layouts. A value of inherit indicates
that the value should be derived from an enclosing parent's value.
Examples
#div1 {height: 50%; max-height: 400px; min-height: 200px;}
#div2 {height: 80%; min-height: 200px;}
Compatibility
CSS 2, 3
IE 7+ Netscape 6+, Firefox 1+ Opera 7+, Safari 1+
Note
• In Internet Explorer 6 and other nonconforming older browsers, JavaScript and
various CSS tricks were often employed to emulate this property.
min-width
This property defines the minimum width a region may reduce to if it is relatively sized and
the browser window is adjusted.
Syntax
min-width: length | percentage | inherit
where the value of length is generally a measurement using a fixed value (for example,
100px ). Percentages also may be used for relative layouts. A value of inherit indicates
that the value should be derived from an enclosing parent's value.
Examples
#div1 {width: 50%; max-width: 800px; min-width: 400px;}
#div2 {width: 80%; min-width: 200px;}
 
Search WWH ::




Custom Search