Reply
Resetting Browser Defaults
Old 05-06-2008, 11:39 AM Resetting Browser Defaults
wayfarer07's Avatar
Extreme Talker

Posts: 223
Name: Abel Mohler
Location: Asheville, North Carolina USA
Here is a subject that I think doesn't come up often enough.

Most professional stylesheets begin with some sort of resetting of browser defaults, in order to gain some type of uniformity (or at least an attempt at it), across mainstream browsers.

The way I do it is a very simple one, using the Universal Selector (*):

Code:
* {
    margin: 0;
    padding: 0;
}
That's it! I put that at the very beginning of my master stylesheet. This does have the effect of removing the default margins from paragraphs, unordered lists, etc, which I then set manually if needed.

Of course there are other defaults to the browsers besides margins and padding, especially involving borders on form elements. I usually choose to deal with these as they come up, or ignore them.

The Yahoo UI team has chosen a much more extreme (and effective) method of dealing with this problem. There is a link to their code, as well as a (45 minute!) video by one of their lead developers explaining their justification behind this approach.

Between what I do (very simple) and the extreme approach of the YUI folks, there are many comfortable mediums. I didn't post this thread to ask a specific question, but instead to bring attention to this issue, which I feel is an important one.

Many of the example stylesheets posted by those learning the art of CSS in this forum are missing this important ingredient, and since a huge focus of our battle in this arena is cross-browser compatibility, I wanted to bring this topic up for discussion, to at least bring attention to it. I would love to hear more approaches besides the two that I mentioned.
__________________
Go FREELANCE <-----|-----> Hire Me
wayfarer07 is online now
Reply With Quote
View Public Profile
 
Sponsored Links (We share ad revenue):
 
Old 05-06-2008, 12:36 PM Re: Resetting Browser Defaults
Junior Talker

Posts: 2
Here are two more way to rest the browser default settings.

http://www.thechoppr.com/blog/2008/0...reset-you-css/
kobra is offline
Reply With Quote
View Public Profile
 
Old 05-08-2008, 08:51 PM Re: Resetting Browser Defaults
pab
Junior Talker

Posts: 3
Name: pab
Eric Meyers has a great one, its pretty extensize

http://meyerweb.com/eric/thoughts/20...eset-reloaded/
pab is offline
Reply With Quote
View Public Profile
 
Sponsored Links (We share ad revenue):
 
Reply     « Reply to Resetting Browser Defaults
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML


Page generated in 0.12740 seconds with 15 queries