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


Page Information

  • 10 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information

Recent PBwiki Blog Posts