CSS Margin Problems

Handling of margins style is different of Netscape 4 than Internet Explorer. It can't handle it properly. But it is possible to get the similar effect using different style tags on the same document. And there is no need to use JavaScript for Browser detection. All you need to do is use the @import & cascading to your advantage.

For example:
When you use a header tag i.e. (h1- h6), huge amount of space is seen between the header and the following paragraph. But if you want to use margin tags to fix this you need to write two different styles to get the work done correctly in Netscape 4 and Internet Explorer.

CSS

In Internet Explorer:
h2 { margin-bottom : 0; }
p { margin-top : 0; }

In Netscape 4:
h2 { margin-bottom : 0; }
p { margin-top : -1em; }