[thelist] Css and IE? PATCHED

Jonathan Bloy JBloy at edgewood.edu
Tue Feb 6 09:20:49 CST 2007

Jeremy Weiss wrote:
>The problem came down to a difference in how IE and
>Firefox calculates margins and such (a single line of
>code, no less). I couldn't seem to figure a way around
>this, so I just split the css into two files... 

One way I've found to help that margin situation among different
browsers is to declare all margins and padding to zero with this
statement at the top of my CSS:

  html * { margin:0; padding:0;}

Then for other elements (such as p, ul, li, etc.) you just need to
specify all margins.

The other persons post about conditional comments for IE (especially IE6
and below) is also a good suggestion.

Jonathan Bloy
Web Services Librarian
Edgewood College
Madison, Wisconsin

More information about the thelist mailing list