Sunday, September 19, 2010

Making web pages show similar in all browsers


Nowadays there are many browsers in town. If you think your website is showing properly in one browser doesn't mean it will show exactly the same in all browsers. It happens because different browsers have different default settings so in order to make you website appear same in all browsers you must normalize all tags.

First thing that you need to do is to equal the padding and margin.

* { margin0padding0; }

This will equalize margin and padding in all browsers.
Next you need to equalize fonts and line heights.

body { font12px/18px Tahoma, Geneva, sans-serifcolor#000; }

and the rest

table { border-collapse:collapseborder-spacing0; }
fieldsetimgtable { border0; }
addresscaptioncodecitedfnemstrongthvar { font-stylenormalfont-weightnormal; }
li { list-style:none; }
captionth { text-alignleft; }
h1h2h3h4h5h6 { font-size:100%font-weight:normalborder-bottom:0 none !important }
inputtextareaselect { font-family:inheritfont-size:inheritfont-weight:inherit; }

a { text-decoration:nonecolor:#000; }


and you are done.