I noticed that the <p>
tag has a default margin value and it seems it's somehow related to its content's font-size
value.
Is there any reference that I can check out the detailed rules for this?
http://jsfiddle.net/z45R9/ Please take a look at my code here.
Thanks,
Different Browsers are build upon different render engines.
Chrome and Safari are using the WebKit-render engine whereas Firefox uses Gecko.
The different engines are different not just because the software is different but also because they have different settings. Thats why most webpages look slightly different in differnt browsers.
The Answer:
In Chrome (webkit) the margin-top (above the element) and margin-bottom (below the element) of the <p>
tag is 1em.
In Firefox (Gecko) all margins are 0 except the margin-bottom wich is 1em again.
The way to get rid of this problem is to make a CSS-reset. The easyest to use would be the one by Meyerweb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With