This is a base stylesheet that I use in some of my projects as an alternative to CSS Resets. I don’t just copy it and go on writing other CSS styles, but tend to modify the rules to fit each project.
Get it
Download: Simple version (shown below) – Extended version
body {margin: 0; padding: 0; font-size: 100%; line-height: 1.5}
h1, h2, h3, h4 {margin: 1em 0 .5em; line-height: 1.25}
h1 {font-size: 2em}
h2 {font-size: 1.5em}
h3 {font-size: 1.2em}
ul, ol {margin: 1em 0; padding-left: 40px}
p, figure {margin: 1em 0}
a img {border: none}
sup, sub {line-height: 0}
Rationale
Default browser styles are fairly consistent. There are a few differencies though, and this stylesheet (especially the simple.css
variant) tries to reduce those differencies for the most common HTML elements.
It takes a more specific and subtle approach than the “carpet bombing” strategy of CSS Resets. For a more comprehensive project with a similar approach, see normalize.css.
Will this fix browser rendering issues?
Nope. No CSS Reset or base stylesheet can. (Most browser rendering issues arise from lacking browser capabilities, subtleties in implementations, or outright browser bugs. There is no fail-safe patch for those.)