webmonkey

 

margin-top

Page history last edited by Ryan M. 2 yrs ago

The margin-top property sets the top margin of an element.

 

Note: Negative values are allowed.

 

CSS properties can also be dynamically changed with a JavaScript.

Example:

p.stay-away { margin-top: 100px }

 

 

Example:

I am a paragraph. My margin has not been set.

I am a paragraph. My top margin has been set.

 

Result:

 

I am a paragraph. My margin has not been set.

 

I am a paragraph. My top margin has been set.

 

Source: http://www.quackit.com/css/properties/css_margin-top.cfm

Comments (0)

You don't have permission to comment on this page.