Geeks With Blogs
Stephanie Grima C#, ASP.NET and my life.

Margin Properties

Margin properties in CSS has to do with the space around elements. One can tackle all margins at one time by using the following css:

p
{
     margin: 2cm 4cm 3cm 4cm
}

Or else, one can make use of margins seperately in terms of:

  • margin-top
  • margin-bottom
  • margin-left
  • margin-right

Margins may also be given negative numbers in order to overlap elements on top of each other. Example:

p
{
  margin-bottom: -30px;
}

Below is a graphic to better explain which part is the margin part. The other properties (padding, border) will be dealt later on this course:

Posted on Tuesday, November 4, 2008 9:32 AM HTML / CSS | Back to top


Comments on this post: Part 2: Margin: Property [CSS]

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Steffi | Powered by: GeeksWithBlogs.net