2 replies [Last post]
Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 4 weeks 3 days ago
Timezone: GMT-4
Joined: 2009-10-09
Posts: 2043
Points: 2268

OK, let's say I want to zero out the padding on my h1 tag. Fine. I can either use a stupid CSS reset or I can smartly just zero out the padding on my h1 tag. This means CSS reset offers absolutely no benefit.

Next, let's say I want to change the default padding on my h1 tag. Great. I can either use a stupid CSS reset and add the desired padding to my h1 tag or I can just add the desired padding to my h1 tag. In this case using the CSS reset undoes and forces you to redo the padding making it utterly useless from the start.

The only advantage I can see is to allow those new to CSS to not have to understand collapsing margins, well, I wouldn't call that an advantage, just an allowance for laziness.

Sorry about the rant, I've just run into someone telling another person to "use a CSS reset" instead of giving a reason for the issue at hand about 30 times in the past 2 days.

I feel better. Thank you.

Tags:
Tyssen
Tyssen's picture
Offline
Moderator
Brisbane
Last seen: 5 years 33 weeks ago
Brisbane
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8201
Points: 1386

I used to use resets but gave

I used to use resets but gave up some time ago for the reasons you've given above: I explicitly state all margins and padding on every element anyway, so am never caught out by the browser defaults.

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 day 17 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

If an element has default

If an element has default values that are handled differently by browsers a reset causes you to have to set it again or another anyway. Far better to use a setonce methodology, use the browser defaults as much as possible and set anything else to the value that you need.