Top of CSS file to reset everything

October 3, 2008 · Print This Article

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; }


Your choice for site templates and wordpress themes

Comments

Got something to say?

You must be logged in to post a comment.