Floats, Fonts, and Other Style Sheet Property References - Height
(Page 4 of 4 )
height
IE 4 NN 4 Moz all Saf all Op all CSS 1
Inherited: No
Sets the height of a block-level, replaced, and positioned element’s content height (exclusive of borders, padding, and margins).
ime-mode
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 1). When observing the CSS standards, the height applies to only the content portion of an element, irrespective of borders, padding, or margins.
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, Mozilla, Safari, and Opera, all elements except nonreplaced inline elements, table column elements, and column group elements.
Object Model Reference
[window.]document.getElementById("elementID").style.height
Please check back next week for the continuation of this article.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |
|
This article is excerpted from chapter four of Dynamic HTML: The Definitive Reference, Third Edition, written by Danny Goodman (O'Reilly; ISBN: 0596527403). Check it out today at your favorite bookstore. Buy this book now.
|
|