HTML and CSS Reference
In-Depth Information
Compatibility
CSS 1, 2, 3
IE 4+
Netscape 4+, Firefox 1+
Opera 4+, Safari 1+
Notes
• Support for varying degrees of light or bold beyond simple bold or not bold is
generally not implemented by browsers though theoretically printing may support
such distinctions.
• Theoretically, application of bold to a font may allow a mapping from one font like
Helvetica to a related font like Helvetica Bold or Helvetica Black. In practice, such
mappings don't happen.
height
This property sets the height of an element's content region.
Syntax
height: length | percentage | auto | inherit
Standard positive length units can be used, and pixels ( px ) is often the assumed measurement
in browsers. Percentage values, based on the height of the containing element, can also be
used. The default value of auto automatically calculates the width of an element, based on
the height of the containing element and the size of the content.
Examples
p {height: 400px; width: 200px; padding: 10px; border: solid 5px;}
#div1 {height: 50%; width: 50%;}
Compatibility
CSS 1, 2, 3
IE 4+
Netscape 4+, Firefox 1+
Opera 4+, Safari 1+
Notes
• The actual size of an object on a browser canvas is not solely defined by the height
property, as values for borders and padding affect the space taken. For example,
given the CSS here
#div1 {height: 200px; padding: 30px; border: solid 20px;}
Search WWH ::




Custom Search