margin-bottom, margin-left, margin-right, margin-topNN 4 IE 4 CSS 1

Inherited: No

All four attributes set the width of a single margin edge of an element. A margin is space that extends beyond the element's border and is not calculated as part of the element's width or height.

 
CSS Syntax
 
margin-bottom: marginThickness | auto
margin-left: marginThickness | auto
margin-right: marginThickness | auto
margin-top: marginThickness | auto
 
Value

Values for marginThickness can be lengths, percentages of the next outermost element size, or the auto constant.

 
Initial Value

0

 
Example
 
blockquote {margin-left: 20; margin-top: 10}
#narrowCol {margin-left: 30%; margin-right: 30%}
 
Applies To

All elements.

 
Object Model Reference
 
[window.]document.getElementById("elementID").style.marginBottom
[window.]document.getElementById("elementID").style.marginLeft
[window.]document.getElementById("elementID").style.marginRight
[window.]document.getElementById("elementID").style.marginTop