Jump to content

stripping default margin/padding from all elements in CSS


akitchin

Recommended Posts

i recently saw a post that advocated using * { margin: 0; padding: 0; } to avoid most typical CSS alignment issues.  i quite liked this, because it did resolve a lot of cross-browser problems.  when i used a <select></select> box in firefox with this declaration in the stylesheet, its width was inexplicably shorter than the longest (and indeed, most) options.  no amount of padding/margin changes to the select element (type selected and with the style attribute) would fix it.  two questions:

1.  does anyone else get this happening to them?
2.  anyone know of a fix?

for now i've simply specified all tags other than select that i'm using in the default margin/padding stripping.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.