Difference between revisions of "CSS GUIDE MARGIN LEFT"
(→See Also) |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Summary == | == Summary == | ||
+ | Sets the left margin of a given element. | ||
+ | *Inherited: No | ||
+ | == Syntax == | ||
+ | <pre>TARGET_ELEMENT {margin-left: value;}</pre> | ||
− | |||
− | |||
== Legal Values == | == 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 == | == Mozilla Recommended Values == | ||
== Usage Examples == | == Usage Examples == | ||
+ | <pre>h1 {margin-left: 10%;}</pre> | ||
+ | |||
+ | <pre>h2 {margin-left: 20px;}</pre> | ||
+ | |||
+ | <pre>h3 {margin-left: -40px;}</pre> | ||
== Notes == | == Notes == | ||
+ | Negative values are allowed. | ||
== Specification Conformance == | == Specification Conformance == | ||
+ | [http://www.w3.org/TR/CSS1#margin-left CSS 1]<br /> | ||
+ | [http://www.w3.org/TR/CSS21/box.html#propdef-margin-left CSS 2.1] | ||
== Browser Compatibility == | == Browser Compatibility == | ||
== See Also == | == See Also == | ||
+ | margin-right<br /> | ||
+ | margin-top<br /> | ||
+ | margin-bottom<br /> | ||
+ | margin |
Latest revision as of 03:13, 12 December 2006
Contents
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
margin-right
margin-top
margin-bottom
margin