OU Courses Banner ADBH Web - Cascading Style Sheets CSS Margin Properties
ADBH Web Friday 03 September 2010

Cascading Style Sheets CSS Margin Properties<

CSS Charts - Margin Properties

Margin Properties

Property

Description

Values

Sample Code

margin

Sets all of the margin properties of an element from one to four values

length
percentage
auto

h1 {margin: 4px}

h2{margin:2 1 3 3px}

margin-bottom

Sets bottom margin

length
percentage
auto

h1 {margin-bottom: 2em}

margin-left

Sets left margin

length
percentage
auto

h1 {margin-left: 2px}

margin-right

Sets right margin

length
percentage
auto

h1 {margin-right: 10.5%}

margin-top

Sets top margin

length
percentage
auto

h1 {margin-top: 2em}

 

Top of Page

 

 

 

Page built in 0.0006 seconds