When i use margin-bottom is CSS, the results vary across browsers (esp lovely IE) what impacts the CSS property “Margin” what other rules do i need to check i’ve implemented before i can see a consistent result across all browsers…
When i use margin-bottom is CSS, the results vary across browsers (esp lovely IE)
Share
Some browsers (IE) collapse margins. It doesn’t just affect the bottom margin, but also the top.
If you have two stacked elements, both with a margin of
margin: 10px 0 15px;, you might think there would be 25px of space between the two. However, IE collapses the margins so all that’s left is the greatest margin (which is 15px in the example above).As to helping ensure browsers display things consistently, a good place to start is a good reset stylesheet (Eric Meyer’s or YUI’s for example).