I know a lot of people use this:
* { margin:0; padding:0; }
To help reduce code and eliminate lots of those strange default margins issues.
Don't think this has been mentioned anywhere yet, but one issue I found with
this, was that within dropdowns the "downarrow" GUI, covers some of the text
on the right. Here is the fix for that:
option { padding-right:1em; }
I use margin, but now that I think about it padding may be better since it won't "collapse" against any other nearby margins...
Here's what I put at the top of my primary stylesheet for every site I'm doing recently. It models all browsers' defaults on Mozilla's (mostly).
/* ----------------- STANDARDIZE DEFAULTS ----------------- */
/* default whitespace [ref:http://leftjustified.net/journal/2004/10/19/global-ws-reset/] */
* { padding:0; margin:0; }
h1, h2, h3, h4, h5, h6, p, pre, blockquote, label, ul, ol, dl, fieldset, address { margin:1em 0; }
input { padding: 0.08em 0; }
option { margin-right:0.5em; }
li, dd { margin-left:2em; }
fieldset { padding:0.5em; }
/* /whitespace */
/* font : don't forget Win IE resize-font hack of setting by % of 16px */
body { font:11px Verdana, Arial, Helvetica, sans-serif; }
* { font-size:1em; }
input, select, textarea { font-size:1.18em; }
/* /font */
/* ----------------- /STANDARDIZE DEFAULTS ----------------- */
Then in my Win IE hacksheet:
body { font-size: 67%; }--
Ben Curtis
WebSciences International
http://www.websciences.org/
v: (310) 478-6648
f: (310) 235-2067
****************************************************** The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************
