Ire Aderinokun 7/4/2017

What's the Deal with Collapsible Margins?

Read Original

This article delves into the CSS feature of collapsing margins, explaining how vertical margins between adjacent block-level elements combine. It uses a Twitter poll example to illustrate that when a top margin of 30px meets a bottom margin of 10px, the resulting space is the larger value (30px). The piece reviews the box model and details specific scenarios where margin collapsing occurs, such as between parent and child elements.

What's the Deal with Collapsible Margins?

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser