HTML and CSS Reference
In-Depth Information
Box Model
Next we look at the various properties that can be used to control the box model of your page
elements.
margin
A shorthand property used to specify all four individual margin properties in one step.
Value: Multiple instances of <length> | <percentage> | auto
Initial value: 0
Inherited: No
Applies to: All elements
Supported by: Firefox, Safari, Opera, Internet Explorer
margin-top, margin-right, margin-bottom, margin-left
Used to specify the space between the element's bounding box and the bounding boxes of
adjacent elements.
Value: <length> | <percentage> | auto
Initial value: Determined by user agent, and different for different elements
Inherited: No
Applies to: All elements
Supported by: Firefox, Safari, Opera, Internet Explorer (see note)
Note In Internet Explorer 6 and lower, several margin-related bugs are exhibited. Among them: margins
may double when element is floated, percentages may refer to the incorrect parent element, and auto may
act in an unexpected manner when elements are absolutely positioned. The Position Is Everything web site
( www.positioniseverything.net/ ) covers all IE 6 bugs in exhaustive detail.
padding
Used to specify all four individual padding properties in one step.
Value: Multiple instances of <length> | <percentage>
Initial value: 0
Inherited: No
Applies to: All elements
Supported by: Firefox, Safari, Opera, Internet Explorer
Search WWH ::




Custom Search