Meyer refines CSS global reset

Eric Meyer has been a champion of the global reset solution to some browser inconstancy problems for some time now. His latest version, which I recommend all page developers use, is now on a dedicated page at meyerweb.

If you are new to (X)HTML and CSS or if you have been burying your head in the sand for a decade, you will not understand the need for a global CSS reset. Meyer explains all on his site but if by some miracle of googlonics you come here first, I'll waffle a little on the subject here.

Not all browsers are born equal and not all browsers are Internet Explorer, which may come as a surprise to some of you. If it does, I recommend you go to Mozilla's Firefox site and download a more secure, more standards compatible and more extensible browser right now!

Browser developers have over the years, with varying degrees of success, failed miserably to fully and reliably implement all of the W3C's HTML and CSS definitions in their page rendering engines. Originally this was because they simply did not care. They were too busy competing with one another with non-standard HTML capabilities that they all but ignored the specifications. More recently they, some faster and more effectively than others, have started to smell the coffee.

However, none of them get it completely right, not least in how they apply CSS to a page element where no CSS is defined for the page. i.e. where you haven't specified a value. Some apply defaults correctly according to W3C specifications, while others don't. The only way to be sure that every element on the page behaves from scratch in a predictable way, across all browsers, is to include a style sheet with all elements actively set to a particular value. You can then confidently fiddle with the CSS knowing that the remaining browser differences are not caused by hidden default values being randomly applied.

So copy the reset CSS from Meyer's page and put it at the top of your site's main CSS file or @import it. Then apply specific styles as you normally would confident that anything you don't style will behave consistently across browsers.

Dead at 66? We'll see!

cancer from OKcupid

cancer
or not

Mr Smelly's unmentionables

article categories

a wider voice

RSS Feeds

Search This Site