CSS ResetReset your CSS to start off on the right foot ;)

The original code has been written by Eric Meyer but since it has not been updated for almost 3 years, I’ve decided to regularly update it here.

Contribution and Download

Star   Download

Releases Notes

  • Version 2.1 : + textarea { resize: none; } to avoid textarea resizing.
  • Version 2.2 : + a { outline: none; } to avoid dots around links.
  • Version 2.3 : I implemented many stuff from YUI 3.5.0 reset.css.
  • Version 2.4 : + body { -webkit-font-smoothing: antialiased; } to avoid aliasing on Chrome.
  • Version 2.5 : + a { color: inherit; text-decoration: none; } to avoid links auto-formatting.
  • Version 2.6 : + button { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } to avoid buttons auto-formatting.
  • Version 2.7 : + body { font-size: 0 } to avoid unwanted spaces between inline block elements.

Source Code

/*
  Ivan Gabriele : http://www.ivangabriele.com/css-reset/
  v2.7 | 20141220
  License: MIT
*/
 
html{
  color: #000;
  background: #fff;
}
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, button, 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,
input, select, textarea,
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;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
a {
  color: inherit;
  outline: none;
  text-decoration: none;
}
blockquote, q {
  quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}
body {
  -webkit-font-smoothing: antialiased;
  font-size: 0;
  line-height: 1;
}
caption, th {
  text-align: left;
}
fieldset, img {
  border: 0;
}
legend {
  color: #000;
}
ol, ul {
  list-style: none;
}
sub {
  vertical-align: text-bottom;
}
sup {
  vertical-align: text-top;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
textarea {
  resize: none;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>