height | NN 4 IE 4 CSS 1
| Inherited: No
Sets the height of a block-level, replaced, and positioned element's content height (exclusive of borders, padding, and margins). IE for Windows counts top and bottom margins, padding, and borders when calculating the height of an element until you reach IE 6 in standards-compatibility mode (see the DOCTYPE element in Chapter 8). When observing the CSS standards, the height applies to only the content portion of an element, irrespective of borders, padding, or margins. This change may have significant impact on legacy code that you are bringing up to W3C compatibility.
CSS Syntax
    height: length | percentage | auto
Value
See the discussion about length values at the beginning of this chapter. The setting of auto lets the browser determine the height of the element box based on the amount of space required to display the content.
Initial Value
auto
Example
    div#announce {height: 240}
    textarea {height: 90%}
Applies To
Navigator 4, all absolute-positioned elements; Internet Explorer 4, applet, div, embed, fieldset, hr, iframe, img, input, marquee, object, span, table, and textarea elements; Internet Explorer 5 and Netscape 6, all elements except nonreplaced inline elements, table column elements, and column group elements.
Object Model Reference
    [window.]document.getElementById("elementID").style.height