Margin Collapse

Leave a Comment
Margin Collapse is not any CSS property but its a behaviour of block level elements. Top and bottom margins of blocks are sometimes combined (collapsed) into a single margin whose size is the largest of the margins combined into it, a behavior known as margin collapsing.


In the above example the first paragraph is having the margin bottom 20px and second paragraph is having margin top 30px. So here the two margins will collapse into one.

So the gap between two paragraphs will be 30px.


Next PostNewer Post Previous PostOlder Post Home

0 comments:

Post a Comment