Building cross-browser CSS

CSS Add comments

CSS is a life saver when it comes to managing the GUI of a website.

Changing 1 style in the CSS file, will affect the whole website (if you implemented CSS in the right manner offcourse ;-) )

But even your precious planned CSS lay-out is a victim of the different rendering of the default styles in the various browsers.

For example a H1 is rendered in IE with a specific white margin below its text, while in FF this has a different margin.

Even a form is rendered differently.

To prevent from working with 10 different CSS files, one for each browser existing, it’s easier to reset all the default styles to a specific style.

This can very easily be achieved. You need to set all the default styles in 1 CSS which you include each time as the first CSS file and next you will be working with a CSS lay-out that’s cross browser compatible.

How to reset the default styles and which styles to reset is explained by Shape Shed :: http://shapeshed.com/journal/default_styles_for_css/

Another great explenation can by found at the Yahoo UI Library (which is an excellent reference concerning UI) :: http://developer.yahoo.com/yui/reset/

Go have a look and you will save several hours and a lot off stress and cursing when you start lay-outing your next website or web application to be cross browser compatible.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in