Hey there, thanks for visiting Painted Foot. This site looks lurvely in any modern browser, but if you’re seeing this message, you’re not using one! Bummer. Check out the newest browser versions from Firefox, Netscape, Opera or Microsoft . Download a copy today because you're missing out. If you’re seeing this on a thin client (cell phone, PDA, etc.), as you were.

Blog
CSS: Dealing with browser differences in margins and padding PDF Print E-mail
Written by Catherine F. Laine   
Sunday, 04 June 2006

This is the best tutorials I've found on getting different browsers to behave similarly with respect to padding and margins. It's an oldie but a goodie. I'm loving' it.

 

Global White Space Reset by Andrew Krespanis.


Here is his offered up code.  I urge you to read his post though to learn about the why's and wherefores.

  1. * {
  2. padding:0;
  3. margin:0;
  4. }
  5. body {padding:5px;}
  6. h1, h2, h3, h4, h5, h6, p, pre, blockquote, form, label, ul, ol, dl, fieldset, address { margin:20px 0; }
  7. li, dd, blockquote { margin-left: 40px; }
  8. fieldset { padding:10px; }

or for a little pizzazz: 

  1. * {
  2. padding:0;
  3. margin:0;
  4. }
  5. h1, h2, h3, h4, h5, h6, p, pre, blockquote, label, ul, ol, dl, fieldset, address { margin:1em 5%; }
  6. li, dd { margin-left:5%; }
  7. fieldset { padding: .5em; }

 

 

Last Updated ( Monday, 05 June 2006 )
 
< Prev



 
Painted Foot © 2006
Appropriate Infrastructure Development Group