CSS Reset v2.0

Few weeks back there was a heavy discussion about usefulness of CSS Resets. One group of people strongly support CSS Reset and the other one states, that it can do more harm than good. If you are interested in knowing more about the dilemma of CSS Reset follow this link.  I don’t really mind the outcome as in the end, the only thing that matters is that your pages should really work with or without CSS Reset.

Whether is was thanks to this discussion or something else, Eric Meyer did an update of his CSS Reset code which now contains reset style for HTML5. So, if you are using his code and you plan to write some HTML5 or just want a better CSS Reset, grab the updated version below:

Source: meyerweb.com

/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}

Note: In case you are working with CSS Reset for the first time and you want to know more about this technique, read my previous blog post about CSS Reset.

Comments are closed.