1

Is there any way to reset a CSS property to its standart value without knowing the value itself? I have already tried font-size: reset; but that doesn't work.

Thanks!

Dominik Schmidt
  • 537
  • 1
  • 8
  • 22
  • http://meyerweb.com/eric/tools/css/reset/ – APAD1 May 20 '14 at 18:42
  • 1
    I assume you are working with an established code base which cannot be simply reset, so if that is true, try `font-size: inherit;` here's a fiddle: http://jsfiddle.net/vhm3J/ – Pat Newell May 20 '14 at 18:49

1 Answers1

3

Use Eric Meyer CSS Reset.

Here is the code:

/* 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;
}
Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133
  • 3
    OP isn't looking for a CSS reset sheet. He needs a way to undo the changes made so that the element reverts to its default unstyled state. – j08691 May 20 '14 at 18:44