You are here: Home / Webmaster / Did you really reset everything?

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.

3 Responses to “Did you really reset everything?”

  1. Jeff Starr April 20th, 2008, 3:07 pm

    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 April 20th, 2008, 4:10 pm

    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 April 21st, 2008, 1:00 am

    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