Re: [WSG] Zero margin - just sharing
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; } Indeed, that is an issue, but to my understanding it only affects Gecko browsers. Brian Drum bought up a solution in the original post: option {min-width:1.5em} Different approach, same result :) Andrew. -- http://leftjustified.net/ ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Zero margin - just sharing
I know a lot of people use this: * { margin:0; padding:0; } issue I found with this, was that within dropdowns the downarrow GUI, covers some of the text on the right. That's why I never reset margins/padding for all elements, and just set them (both!) where it matters (body/h1/ul/li). But I use some 'global' rules: a img {border: 0;} table {border-collapse: collapse;} form {margin: 0;} fieldset {padding: 0.5em;} -- regards, Kornel Lesiski ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Zero margin - just sharing
Jacobus van Niekerk wrote: Hi all, 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; } Maybe just stick to: html, body { margin:0px; padding0px; } Then make sure to state margins for h# and such. This is the best option IMHO. ** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list getting help **
Re: [WSG] Zero margin - just sharing
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 **