Browser compatibility

Filed under: CSS Stylesheets

A couple of browser compatibility issues. As almost every web designer knows, how a browser renders a page is very dependent on which browser is doing the rendering.

Here’s a couple of tips to use when trying to get a web page to render the same across most browsers (IE, Firefox and Opera).

Do NOT use <br clear=”all”>

IE does not render this at all. It’s better to use <div style=”clear:both”> which works across most browsers.

Specify CSS definition “margin-top” for lists

The default margin-top for lists differs between the main browsers. IE’s default margin-top is zero. Firefox and Opera has a default margin-top of about 1 em.

It’s best to always specify a margin-top in CSS when using lists.

divider

Leave a Comment