Where do people stand on CSS resets?
I used to use
CODE
* {margin: 0; padding: 0;}
to cancel all the browsers' default margin and padding.
But I've been reading recently that a lot of people don't use this anymore as it creates more work later on by cancelling margin and padding on certain elements which need margin and padding, such as form elements.
Is it best to reset default styles only for certain elements, or just let the browsers do their thing?
---------------------
baby boy dolls - best places to ski
Page 1 of 1
CSS Reset
#2
Posted 29 December 2009 - 03:02 PM
i use meyers reset, and modify to suit. It's definetly worth doing a reset on all elements you're going to use though. Otherwise browser variations are going to creep in. Some variation between browsers is fine, and somewhat inevitable. But you need to make a judgement on what the design and the content can cope with.
http://meyerweb.com/...reset-reloaded/
http://meyerweb.com/...reset-reloaded/
#3
Posted 29 December 2009 - 03:05 PM
Don't let browsers do their own thing because they all have different default margins and padding.
I tend to set the main tags like p, h1 to h6, ul, li, input and a few others to what I think is reasonable for my site at the very beginning of the stylesheet rather than set everything to 0 and then reset them to a size later.
I tend to set the main tags like p, h1 to h6, ul, li, input and a few others to what I think is reasonable for my site at the very beginning of the stylesheet rather than set everything to 0 and then reset them to a size later.
#4
Posted 29 December 2009 - 04:46 PM
Well we set everything to zero then set our CSS out - I like this, it's straightforward plus I always design and initially check in IE as that appears to be the biggest pain, then I have no surprises! Started learning CSS about 2 weeks ago and have set up about 6 sites since and that method is working pretty well for me!
#5
Posted 29 December 2009 - 04:53 PM
JuliaTolmacha, on 29 December 2009 - 02:47 PM, said:
Is it best to reset default styles only for certain elements, or just let the browsers do their thing?
1) Instead of all the spacing and links at the end of your post, you can just add them to your signature by going here
2) Don't rely on browsers whatever you do - they always vary and it's best to have some sort of reset.
I use * {padding:0;margin:0;} but it's normally following by declaring some properties for elements such as the margin under paragraphs, heading sizes, link styles etc.
These can then be overwritten for specific elements later down the CSS, but it gives a good base to work with.
EDIT: There's a decent collection of resets available here for you to have a look at
#6
Posted 03 January 2010 - 07:34 PM
bocaj, on 29 December 2009 - 03:02 PM, said:
i use meyers reset, and modify to suit. It's definetly worth doing a reset on all elements you're going to use though. Otherwise browser variations are going to creep in. Some variation between browsers is fine, and somewhat inevitable. But you need to make a judgement on what the design and the content can cope with.
http://meyerweb.com/...reset-reloaded/
http://meyerweb.com/...reset-reloaded/
+1, this is the one to use.
#7
Posted 03 January 2010 - 08:05 PM
Meyers Reset seems to be the most popular amongst professionals but I tend to use:
I've never had any issues.
* {
padding: 0;
margin: 0;
}I've never had any issues.
Share this topic:
Page 1 of 1
Help


















