Mostly practical advices

What is global CSS reset?

One of the most common mistakes when creating a website is not removing the default browser CSS styling. This leads to inconsistencies in the appearance of your website design across browsers, and makes a lot of coders to blame the browser. It is a misplaced blame, of course. Before you do anything else when coding a website, you should reset the styling.
Global reset is needed to ensure the more or less identical cross-browser presentation of your website. By default different browsers use different values for margin, padding or line-height. Global reset makes sure all (or probably most) browsers render sites identically.
A lot of designers clear the styling with a global reset like this:
* { margin: 0; padding: 0; } but it is a bad practice, as it’s very heavy on the rendering agent to apply rules to every single element in the document, especially with large web pages, and this can also destroy a lot of good default styling, especially when you want to have default styled form input fields and submit buttons. They lose their native styling that goes beyond the browser. Instead, you should pick-and-choose the elements you want to reset. It also makes it easier to apply your own style to common elements.

If you are experienced web developer you might want to create CSS reset by yourself or you can use one created by others:

  • CSS Reset Reloaded by Eric Meyer
    As Meyer says, “… the styles should list all the actual elements to be reset and exactly how they should be reset.”
  • CSS Global Reset by Christian Montoya
    “It’s far better to have a complete list of default settings to apply from the beginning that targets the specific browser inconsistencies.”
  • Master Stylesheet
    This default-stylesheet takes some typographic rules into consideration, such as the spacing between heading tags, paragraphs, and blockquote elements.
  • Yahoo! UI Library: Reset CSS
    YUI Reset CSS file removes and neutralizes the inconsistent default styling of HTML elements, creating a level playing field across A-grade browsers and providing a sound foundation upon which you can explicitly declare your intentions.
  • Tripoli
    Tripoli is “a generic CSS standard for HTML rendering. By resetting and rebuilding browser standards, Tripoli forms a stable, cross-browser rendering foundation for your web projects.”A set of default-CSS-files is supposed to give you a profound foundation for cross-browser compatible CSS-based designs. All default-values - including dozens of elements - tables, lists, typography, but also headers (h1 - h6), abbreviations, citations, quotes and forms are selected to enable an optimal legibility and well-structured text presentation.

Tags: , , , , , , , ,


Posted in CSS. 265 views
You can leave a response, or trackback from your own site.

1 Comment

Leave a comment

Note for spammers! Don't waste your time - all comments being moderated!