Did you really reset everything?

Every browser has different margin and padding values that are set as default. Thats why we prefer to reset all values before building up a site. Most of people add,

* {margin:0; padding:0; border:0}

to the top of their CSS file to reset everything. But do you really thing that it is enough to reset everything? Use following code block on the top of your CSS file and see what else you’ve missed to reset.

a:link, a, a.visited { text-decoration:none; }
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form, fieldset,input,textarea,blockquote,th,td,p { margin:0; padding:0; }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover { text-decoration:none; }
table { border-collapse:collapse; border-spacing:0; }
fieldset,img { border:0; }
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; }
ul,ol { list-style:none; }
caption,th { text-align:left; }
q:before,q:after { content:''; }
abbr,acronym { border:0; }

I copied this code from a subpage of Yahoo months ago. Can’t remember the original source at the moment.

This entry was posted on Wednesday, April 16th, 2008 and is filed under Webmaster. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

3 Responses to “Did you really reset everything?”

  1. Jeff Starr

    I recently wrote an article covering a wide variety of CSS resets. As you will see, there are many excellent resets from which to choose. I hope it helps! Cheers!

  2. Mehmet

    It is good to see you around Jeff.

    To be frank, your website is a great resource with its perfect content. I learned a lot from there :)

  3. Jeff Starr

    Ooops! I meant to include a link to this article:

    ..which presents a great collection of currently available CSS reset styles. (Sorry for the second post, btw..)

    Also, thanks for the kind remarks about Perishable Press — I am glad you find it useful! :)

Leave a Reply