Aug
05
2009

CSS: Default Padding/Margin for a p element

Resetting your css styles is a good thing to do to ensure that your site is rendered the same on all browsers.

Unfortunately, this often wipes out the default p tag padding and margin. The following style will restore a p to it’s normal margin (it doesn’t have a padding).

Each browser styles the p tag differently, thus this restores it to what it would look like in Firefox, creating a uniform look. Exactly what we’re going for.
p{
margin: 1em 0px;
}

Source

Here’s a link on how to use CSS Style Resets correctly:
Resetting Yoru Styles with CSS Reset

Share and Enjoy:
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • RawSugar
  • Reddit
  • Spurl
  • YahooMyWeb
Written by Tom in: CSS | Tags:

No Comments »

RSS feed for comments on this post.

Leave a comment

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes