Stack OverflowBest css reset
[+287] [20] Ticex
[2008-09-22 18:55:42]
[ css css-reset ]

I'm looking for a css reset kit, but I never used one before. So which kits its out there, and whats your experiences regarding these kits?

And, is its any different between these kits, something you need to think about?

Related: Is it ok to use a css reset stylesheet? [1]

(1) 'eh, personally I only use one when necessary. For the majority of the sites I work on, I am perfectly happy with however the browser does things by default. I only mention this to say that whether or not you need it (and probably which one you choose) depends on your specific situation and needs. - Brad links to the most popular reset stylesheets, along with documentation and explanations from the creators about how they came about. This is probably the best starting point. - Blazemonger
[+216] [2008-09-22 18:59:40] Justin Poliey [ACCEPTED]

I use Eric Meyer's CSS reset [1], as do many other people. It's even the reset script that Blueprint CSS [2] uses. Yahoo also has one, Reset CSS [3]. I myself am a fan of Blueprint. There's not much of a difference between these kits, because they all do pretty much the same thing: apply standard rules to elements, and eliminate cross-browser inconsistencies.


(23) And most of them are just based on Eric Meyer's reset anyway. - Sam Murray-Sutton
(3) unfortunately all of them need to be updated with HTML5 elements. Especially the new block level elements like header footer article section and nav - zzzzBov
(35) Eric Meyer's reset stylesheet does have a newer version with HTML5 elements listed... he just forgot to update the page linked. The newer one is at - ssokolow
(1) Just to point out, Yahoo's Base CSS is not a reset, but they have one too (mentioned in the post below). The biggest difference between those two is that Eric Meyer's one is more radical as it resets all the gaps and borders (to the extent possible) and all default font properties using font:inherit, but this also means it doesn't work well in IE ≤ 7. - Adam
@Adam: you shouldn't use relative positioning when referring to other posts (eg the post below). As of now, posts can be sorted three ways (active, oldest, votes), so a person would need to read all posts to determine. Furthermore, imagine if this post was no longer selected as the answer, then the post below may no longer actually be below. - vol7ron
(1) @vol7ron: I thought of that, in this case I supposed the order will not change. But Yes, to be sure, I should have referred the post using its link, thanks for the notice. - Adam
(1) @Adam: just saw you're relatively new, so wanted to let ya know. cheers - vol7ron
[+24] [2008-09-22 19:00:00] public static

Well there are two popular ones:

I personal use YUI's version, but I've seen both used quite frequently.

(1) As knight mentions in his answer, the reset-reloaded is the older link. - HRJ
[+18] [2008-09-22 19:01:30] b3.

Thanks to @ssokolow for providing an updated link to Eric Meyer's reset script:

I've removed the copy and paste of the old script.

[+17] [2011-03-16 01:04:11] Vina

You can compare many of CSS resets in { CSS:resetr } site: and you can also use normalize CSS [1] which will render all element consistently in all browser.


[+16] [2011-01-08 21:18:58] ssokolow

Eric Meyer's is good, but I'd probably go with the superset [1] of it provided by HTML5 Boilerplate [2]. (Update: The link now points to an old revision. HTML5 Boilerplate now uses normalize.css [3])

It's the only one I've seen which does more than just setting vertical-align to make display of input fields consistent. (In my experience, anything QtWebKit-based is likely to misinterpret the dimensions, positioning, font settings, etc. for native-themed widgets embedded in rendered pages)


(9) Since v2.0 HTML5 boilerplate uses normalize.css. This is my favorite at the moment. - To1ne
This one is the most up-to-date. - styu
Link to "superset" in this comment doesn't work any longer, please update. - Emil Stenström
I suggest using normalize.css. This is the newest and included in html5 boilerplate the defacto standard template for modern development. You will probably end up adding back some of the default styles with the other brain dead resets. - Andy
[+14] [2008-09-22 18:57:38] Aaron Maenpaa

I like this one [1], it's four lines long:

* {

(22) This is a really heavy procedure on some older hardware. It can make large pages really sluggish and clunky to load. - Oli
(10) @Oli - I have heard this, but where is the evidence and proof? Is this a matter of clock cycles or miliseconds? - Christopher Altman
(6) Use efficient CSS selectors:… - Török Gábor
(5) Actually guys, this answer is perfectly valid. There's no way to do it more efficiently. If you purposefully mean to target EVERY single element, then this is the way to do it. Writing out every single element manually would be a pain for you and a pain for the browser's parser. - trusktr
On the other hand, if you are resetting only ONE specific element among many similar elements, then this is when you need to use efficient selectors. This answer is a perfectly valid answer in order to reset EVERYTHING. There's no way to do it more efficiently. If you are aiming to reset EVERYTHING, then all other methods WILL use more resources... Really, it depends on your goal.... Besides, most people don't develop with old hardware in consideration. - trusktr
[+4] [2008-09-22 19:07:01] knight0323

Actually Eric Meyer's reset reloaded is his older copy. Go through the top toolbar and click "Toolbox" then find "CSS" and click that. The link should be

I've used Yahoo's Base CSS sheet but I've stuck with Meyer's reset sheet.

[+4] [2008-09-22 19:28:23] VoxPelli

The most important thing about a CSS reset is that it helps you getting your work done easier - therefor you should most probably build your own out of the inspiration you might be getting from already existing and out of your own conclusions about what a CSS reset should do.

My personal CSS reset is a bit different from for example Eric Mayer - but it suits me and makes me more productive which is exactly what it's supposed to do.

[+3] [2008-09-22 18:59:24] Nathan Peretic

The consensus, I think, is Eric Meyer's Reset stylesheet [1]. That's what I use.

Alternatively, you could create your own that resets only the basics.


[+3] [2008-09-22 18:59:32] nobody

I've been very happy with yahoo reset for multiple project. I also use yahoo grids and fonts.

My friends who try and use other products (blueprint etc) eventually find surprises and end up changing over to yahoo's package and being more happy.

[+2] [2011-01-08 08:04:58] ijasnijas

This is Eric Mayer's Reset(Compressed Version).. 'Blue Print' is alright, But while you are using BP, Disable the browser default style with Web Developer tool bar, It shows some different, but not in Eric Mayer's Reset Kit. :)

[+1] [2010-09-02 01:40:54] Webveloper

The best CSS reset is one that isn't used on any site I have to work with. I don't appreciate being forced to use a bunch of CSS hacks and inline styles, all because someone thought having an easier job was more important than making the site scalable and maintainable for the future. I've spent too many hours reworking code from agencies who never considered the havoc global resets might wreak when implemented in a content management system.

Agreed. CSS resets are more trouble than they are worth, and add a ton of extra needless CSS to your site that needs to be processed every pageload. - donatJ
This just isn't true. If you're gzipping your content as you should, the amount of bytes you're sending the client is negligible. The time that resets save you chasing down inconsistencies between browsers is valuable. - sidewaysmilk
My main problem is with overzealous resets like td{vertical-align:baseline;}. With <table id="foo"> and #foo tr{vertical-align:top;}, my style cannot cascade to the td tags as it should. Sure, I can use #foo tr{vertical-align:top !important;}, but that's extra code for no good reason, and may break td styles further down. Browser consistency can be achieved without breaking the normal rendering process. - Webveloper
[+1] [2011-11-26 11:02:07] GG.

I use the reset included in Bootstrap [1] (Twitter's CSS framework):

a:focus{outline:thin dotted;}

And I add: a:focus,input,textarea,select{outline:0;}


(3) This isn't really just a reset. It is a hybrid of (a modified version of) reset.css and normalize.css. Everything from line 6 down is from normalize.css. - necolas
Thank you for this information. - GG.
[+1] [2012-04-04 18:46:20] JugularKill

use CSSesta Reset

In my humble OP:

  • Eric Meyers lacks some old school compatibility.
  • YUI is the reverse but too old school
  • Boilerplate is too interfering

A reset sheets shouldn't set standard "styles" in an attempt to rescue crappy browsers. A reset sheet should default elements to create a general playing field for typical & experimental websites.

Things like line-height, font-size or forcing vertical scroll affects conceptual design.

Display-block rarely intrudes on elements we "expect" to be block. Has 6 options commented out, the rest is a solid default (except for the text selection color)

[+1] [2012-04-23 10:04:07] Stephan

There are many good ones around, like Eric Meyer's Reset stylesheet:

But I think the best practice is to write your own CSS reset file, because you know best which elements and styles you want to reset and which ones you don't mind to be as they are.

Have a look at the most common CSS-reset files and then copy & paste the styles you want to set in your own file.

Here is a link to my reset approach:

[0] [2008-09-22 19:14:57] Vasil

I use Blueprint css. But I never use it just for reset. It's the best help I can get for doing a quick layout of a site.

[0] [2011-01-19 14:11:17] John Catterfeld

I always use a css reset, and if I'm using a third party one I always go a for the Yahoo! hosted stylesheet [1] (mainly because I'm guessing it is the most popular and will be cached on a few visitor's browsers).

I have just come across this website though which might be useful -


[0] [2012-01-11 06:30:00] Spadilha

I use this one:

* { 
    margin:0; padding:0; border:0; 
    outline:0; vertical-align:baseline; font-family:'FontName';

This does not cover the complete needs of a reset by a long shot.... - cale_b
[0] [2012-04-02 15:56:13] NewUser

I use

* {
  padding: 0;
  margin: 0;

and Eric Mayer CSS Reset

This makes my wok much easier

[0] [2012-04-16 15:18:30] polas

This is not a good code. You better go here, choose your page structure and generate web layout with CSS. It works 100% in almost all browsers except for IE 5.

Now download the generated code and extract zip file. Then, open the css file and and you will see simple code you can remake your website to work in 100%.

See CSS Layout Generator at this location [1].

Now upload your website to server. To test at Net Renederer at this location [2].

And that doesn't require any programming skills. ;)