P default margin different in Firefox and IE

If you notice that paragraphs, h1 and other tags have different default margin among browsers, you might want to use the following css code.

* {margin:0px;padding:0px;}

This code removes the additional spaces for all html elements.

OR

If you only want to eliminate the space for selected tags, you will need to use something like the following:

<style>
.no_extra_space 
{
margin:0px;
padding:0px;
}
</style>
<p class="no_extra_space">
</p>

2 comments Write a comment