Skip to navigation
Why margin push all my site divs down on firefox?
07.12.13
Firefox support Margin Collapsing. and when two vertical margins meet up, instead of adding together, the largest margin takes precedent and the other one "collapses" to nothing. to prevent margin collapsing add a border or 1px of padding around the elements so that the borders are no longer touching and so no longer collapse. example: #maincontainer{ padding:1px 0 0 0; } http://www.andybudd.com/archives/2003/11/no_margin_for_error/
Reply
Anonymous
Why margin push all my site divs down on firefox?
Firefox support Margin Collapsing. and when two vertical margins meet up, instead of adding together, the largest margin takes precedent and the other one "collapses" to nothing. to prevent margin collapsing add a border or 1px of padding around the elements so that the borders are no longer touching and so no longer collapse. example: #maincontainer{ padding:1px 0 0 0; } http://www.andybudd.com/archives/2003/11/no_margin_for_error/
07.12.13
Reply
Anonymous
Information Epoch 1750311710
Code that is graceful and clear is less likely to break.
Home
Notebook
Contact us