Web Design Forum: CSS Reset - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CSS Reset

#1 User is offline   JuliaTolmacha 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 29-December 09
  • Reputation: 0

Posted 29 December 2009 - 02:47 PM

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
0

#2 User is offline   bocaj 

  • Retired
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 3,402
  • Joined: 11-January 09
  • Reputation: 99
  • Gender:Male
  • Location:New Sarum
  • Experience:Web Guru
  • Area of Expertise:Entrepreneur

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/


0

#3 User is offline   Wickham 

  • Web Guru
  • View gallery
  • Group: Moderators
  • Posts: 2,875
  • Joined: 11-June 09
  • Reputation: 257
  • Gender:Male
  • Location:Salisbury UK
  • Experience:Intermediate
  • Area of Expertise:Web Developer

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.
0

#4 User is offline   S3 Web Design 

  • Advanced Member
  • PipPipPip
  • View gallery
  • Group: Members
  • Posts: 375
  • Joined: 18-May 09
  • Reputation: 10
  • Gender:Female
  • Location:Norfolk, Suffolk and Essex
  • Experience:Intermediate
  • Area of Expertise:SEO

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!
0

#5 User is offline   MrBrightside 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 855
  • Joined: 05-May 09
  • Reputation: 25
  • Gender:Male
  • Location:In the Diary of Jane
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 29 December 2009 - 04:53 PM

View PostJuliaTolmacha, 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 :)
0

#6 User is offline   rallport 

  • Web Guru
  • PipPipPipPipPip
  • Group: Members
  • Posts: 3,813
  • Joined: 03-January 10
  • Reputation: 266
  • Gender:Male
  • Location:England, UK
  • Experience:Advanced
  • Area of Expertise:Web Developer

Posted 03 January 2010 - 07:34 PM

View Postbocaj, 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/




+1, this is the one to use.
0

#7 User is offline   Gareth Daine 

  • Web Guru
  • Group: Platinum Membership
  • Posts: 1,646
  • Joined: 01-November 08
  • Reputation: 26
  • Gender:Male
  • Location:Cumbria, UK
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 03 January 2010 - 08:05 PM

Meyers Reset seems to be the most popular amongst professionals but I tend to use:

* {
     padding: 0;
     margin: 0;
}


I've never had any issues.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users