Search code examples
cssfirefoxcss-reset

Overriding Firefox 11's baked-in css


I'm trying to remove the 8px margin from the body tag.

I've tried (not all at once)

 * { padding:0; margin:0; }

and

 html, body { padding:0; margin:0 !important; }

and

 body { margin:-8px; }

and even

 <body style="margin:0">

The last one works, but only if I add the style attrib using Firebug; if it's in the original HTML, it gets ignored.

I'm at my wit's end.

Edit: facepalm I figured it out; I'd changed it to a cfm so I could easily call browser-specific styles. Thank you all for your help.


Solution

  • Include a reset stylesheet instead, this way you will reset all of the default values equally in all browsers.

    http://meyerweb.com/eric/tools/css/reset/