Sponsored by Travelzoo
Take Advantage of Ridiculously Low Holiday Airfares view!
travelzoo.com - Flights $52 and up for Thanksgiving, Christmas & New Year. But move on it now.
30 Comments
- xythian, on 11/19/2008, -2/+22Very informative. Great in depth examples!
- nourayehia, on 11/19/2008, -2/+20The idea of a CSS reset is to set these explicitly, so that all browsers will use the same values. Most commonly, everything is set to 0 (or 1 in the case of line-height). This removes all margins, paddings, and so on. Then you add them back later with each element.
I use my own reset, although it's not as aggressive as using * { margin: 0; padding: 0}, because this destroys all styles. - stutimandal, on 11/19/2008, -2/+18Death to IE, esp IE 6 and its ActiveX.
- nyde, on 11/19/2008, -0/+8Why?
- calebh, on 11/20/2008, -1/+6Article compacted into one sentence.
Use this to reset css styles and remove browser inconsistency: http://meyerweb.com/eric/tools/css/reset/index.htm ... and put it as the very first css declaration on the page. - JonnyCasino, on 11/19/2008, -2/+6I agree with the * {margin:0;padding:0;} point, it's bad practice to use this as your reset css solution.
- jaygeeze, on 11/19/2008, -2/+5Probably one the most comprehensive discussion on css reset I've read to date. I didn't know resetting css was only 4 years old (or at least the first popular mention of it), it seems much older than that. I like this post on Nettuts about creating your own Reset.css file: http://nettuts.com/html-css-techniques/weekend-qui ...
- hawksfan03, on 11/19/2008, -1/+3very nice examples... bookmarked for future use
- moltar2, on 11/20/2008, -0/+2YUI has a really good reset file:
Info: http://developer.yahoo.com/yui/reset/
Minified: http://yui.yahooapis.com/2.6.0/build/reset/reset-m ...
Full: http://yui.yahooapis.com/2.6.0/build/reset/reset.c ... - CrushThemTorg, on 11/20/2008, -1/+3CSS reset is a marvelous thing.
One caveat: The article doesn't mention that the * selector is pretty expensive. Use the "Killer Collection of Global CSS Reset Styles" link further down for the good ones. (My personal favorite is YUI's). - chrispen, on 11/26/2008, -0/+1From my understanding, using * will cause the browser a bit more processing time to render the settings across all of the selectors. On the other hand, with the processing power that we have today this really shouldn't be much of an issue.
- ethanpack, on 11/20/2008, -0/+1Oh snap! Looks like someone needs a comment reset!
- moshingmonster, on 11/20/2008, -1/+2Useful information, that I'll probably use in the future!
- bradleyland, on 11/20/2008, -0/+1nyde, how about RTFA? The author covers the reasons not to use the universal selector reset method. The primary reason being that browser support is buggy.
- mannoo2009, on 04/10/2009, -0/+1Excellent articles series.
web hosting reviews and discount coupons: http://www.webhostingreviewz.com - emberjohn, on 11/25/2008, -0/+1another CSS post to be bookmarked.
- banderwocky, on 11/20/2008, -0/+1CSS resets are such a good idea. Really helps.
- addiktion, on 11/20/2008, -0/+1You always hear developers fighting over whether or not to use a css reset file. But I don't see the negative impacts besides as bandwidth & browsers increase. The thing is bandwidth isn't going to be that big of a problem on most web pages that people use unless you have a major main stream site that gets hit daily, in which case your going to need more optimization anyways. I think it's safer in my opinion to let the developer do what works best for him and protect his design work for future years by including a reset sheet.
Not to mention most of the web hosting providers I've found have more then adequate needs for most personal use up to medium businesses. And there are quite a few that actually survive the digg effect at a higher cost. I expect to see a good portion of America at least dipping into those new Comcast speeds sometime in the next 2 years or less due to increased competition from Verizon & Sprint. - jebaird, on 11/20/2008, -0/+1here is a link to my reset style sheet: http://www.jebaird.com/upload/file/global_css.txt
- inactive, on 11/21/2008, -0/+1so does h1 and h2
- croweater, on 11/20/2008, -1/+1A lot of this stuff is covered in the book "The Art & Science of CSS". Worth mentioning given it's available as a free download for the next 14 days only (well, 13 now, and counting...). http://digg.com/programming/Awesome_Offer_Free_CSS ...
- moltar2, on 11/20/2008, -1/+1I use big all the time and optgroup occasionally. Those are great, undervalued tags. E.g.:
[div id="hd"]
[big]SITE TITLE[/big]
[small]tagline....[/small]
[/div]
This creates a very semantic markup and looks good even with styles off.
* Replace ] [ with > - nazsco, on 11/20/2008, -1/+1who still don't use yui?
- inactive, on 11/20/2008, -1/+1I've been scattering "margin:0; padding:0;" all over heck instead of placing Eric's global list of p, dl, dd, dt, ul, li, ...and so on at the top (since I don't use each and every element). I guess I could save some bandwidth doing it this way. Good idea.
- inactive, on 11/20/2008, -0/+0why would you do that? are you using all of those? i have NEVER used big, bdo, optgroup and a bunch of other ones.
- inactive, on 11/20/2008, -1/+1good to know, unfortunately i just got done doing this...
a, abbr, acronym, address, area, b, base, bdo, big, blockquote, body, br, button, caption, cite, code, col, colgroup, dd, del, div, dfn, dl, dt, em, fieldset, form, h1, h2, h3, h4, h5, h6, head, hr, html, i, img, input, ins, kbd, label, legend, li, link, map, meta, noscript, object, ol, optgroup, option, p, param, pre, q, samp, script, select, small, span, strong, style, sub, sup, table, tbody, td, textarea, tfoot, th, thead, title, tr, tt, ul, var{margin: 0; padding: 0; border: 0;} - uncoolcentral, on 11/20/2008, -1/+1I've been meaning to do the CSS reset on a few of my sites for a while. This article makes me mean to do it more, sooner! At least I now have the motivation to do it on my next fresh start or rebuild. Thanks!
- dortcorm, on 01/30/2009, -0/+0Great tip, bookmarked!
http://www.antidote.com.sg - yidishui, on 12/16/2008, -0/+0good
- inactive, on 11/20/2008, -4/+0Is this thing working on IE6?



What is Digg?