DEV Community

Discussion on: Quick CSS Quiz #1

Collapse
 
ismail9k profile image
Abdelrahman Ismail

First of all, because the div is a block-level element it will take the full width of the container, so the distance between the two divs is the vertical distance.
Due to "margin collapsing", the top and bottom margins are collapsed into a single margin whose size is the largest of the individual margins, which is 50px.