Jump to content


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


stripping default margin/padding from all elements in CSS

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.

Share this post

Link to post
Share on other sites

That might be relevant (by way of explanation, not as a solution).

Share this post

Link to post
Share on other sites


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.