Difference between revisions of "CSS GUIDE MARGIN LEFT"

From CDOT Wiki
Jump to: navigation, search
(Syntax)
(Legal Values)
Line 6: Line 6:
  
 
== Legal Values ==
 
== Legal Values ==
length - fixed left margin entered as pixels (px), centimetres (cm) or inches (in)
+
* length - fixed left margin entered as pixels (px), centimetres (cm) or inches (in)
percentage - left-margin value entered as a percentage (%)
+
* percentage - left-margin value entered as a percentage (%)
auto - left-margin value is selected by the browser.
+
* auto - left-margin value is selected by the browser.
  
 
== Mozilla Recommended Values ==
 
== Mozilla Recommended Values ==

Revision as of 04:11, 12 December 2006

Summary

Sets the left margin of a given element.

  • Inherited: No

Syntax

TARGET_ELEMENT {margin-left: value;}

Legal Values

  • length - fixed left margin entered as pixels (px), centimetres (cm) or inches (in)
  • percentage - left-margin value entered as a percentage (%)
  • auto - left-margin value is selected by the browser.

Mozilla Recommended Values

Usage Examples

h1 {margin-left: 10%;}
h2 {margin-left: 20px;}
h3 {margin-left: -40px;}

Notes

Negative values are allowed.

Specification Conformance

Browser Compatibility

See Also