Box dimensions in CSS and DHTML such as padding, border, and margin. IE 6 gave IE the option to render items as CSS compliant. See CSS Enhancements in Internet Explorer 6 [§].

Box Dimension Attributes

These are the usual CSS attributes that specify the dimensions of an object/element/content. These CSS Attributes have string values. These attributes can be scripted and can be used inline with HTML. There is a distinction between the size of the just the element and the size of the "box" (which includes the borders and margins).

The basic box dimensions of padding, border, and margin

Image illustrating the relationship between content, padding, borders, and margins.

In Internet Explorer, all elements have "layout" unless the element is inline and is neither absolutely positioned or has its height or width specified.

In non-compliant IE:

In compliant IE:

Read-Write Dimension Attributes

These are read-write attributes available when the position attribute is not set to the default of static.

Read-Only Dimension Attributes

These are read-only attributes that can be scripted but cannot be used inline with HTML (since they are NOT CSS). These attributes are actually properties of the DHTML OM, i.e. the OM applied to Internet Explorer's HTML documents.

Here is an image borrowed directly from MSDN. Personally I think it's all screwed up.

 

Box dimensions from a DHTML perspective

This image, also borrowed from MSDN, clearly shows how the old IE was not CSS compliant before and how IE 6+ (with the !DOCTYPE switch thrown) correctly follows CSS.

Box dimensions in before and after IE 6

Miscellany

Page Modified: (Hand noted: 2007-08-14 20:27:14Z) (Auto noted: 2007-11-17 06:48:20Z)