CSS Firefox top-margin Extra Space

Firefox renders CSS margin-top in such a way that if there are two elements, one inside another, and you set margin-top for the inner element, the outer element collapses the margin-top amount of height. So you may see extra ‘padding’ or ‘spacing’ at top of the outer element.

The solution is to add either a padding-top to the child element, or add border-top.

WTF? Does FF just get jealous of all the attention IE gets?

Thanks 

Shi Chuan

http://www.blog.highub.com/css/css-hacks/css-firefox-top-margin-extra-space/

Thank you for reading!

It's only fair to share...Tweet about this on Twitter
Twitter
Share on Facebook
Facebook
Email this to someone
email

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.