CSS Style reset

21 April 2011

I won’t go too far into the benefits of using css resets. Basically, it levels the playing field across the many systems and browsers, so you can feel (slightly) confident your styles will display similarly.

This is not how i usually format beautiful CSS, but i’ll do it this time for space sake (there are a lot of selectors per attribute list)

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,iput,textarea,p,blockquote,th,td { margin:0; padding:0; }
table { border-collapse:collapse; border-spacing:0; font-size:inherit; font:100%; }
fieldset,img { border:0; }
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; }
li { list-style:none; }
caption,th { text-align:left; }
h1,h2,h3,h4,h5,h6 { font-size:100%; font-weight:normal; }
q:before,q:after { content:''; }
abbr,acronym { border:0; font-variant:normal; }
sup { vertical-align:text-top; }
sub { vertical-align:text-bottom; }
input,textarea,select { font-family:inherit; font-size:inherit; font-weight:inherit; *font-size:100%;}
legend { color:#000; }
body { font:13px/1.231 arial, helvetica, clean, sans-serif; *font-size:small;*font:x-small;text-align:center; position:relative; }
pre,code,kbd,samp,tt { font-family:monospace; *font-size:108%;line-height:100%; }
strong { font-weight:700; }
iframe { border:none; outline:none; }
small { font-size:100%; }
a:focus { outline:none; }

Matt Sain

Ramblings of a developer, designer and child subscribe

This blog is a public GitHub repository. If you find an error I will not be surprised... but if you fork and edit the blog and send me a pull request you'd be pretty awesome in my book.

Featured Repos