Home > Article > Web Front-end > What is margin overlap
Margin overlap: refers to the adjacent boundaries of two or more boxes (which may be adjacent or nested) (without any non-empty content, padding, or borders in between). together to form a single boundary.
Under what circumstances will margin overlap occur:
1. The top boundary of the element overlaps the bottom boundary of the previous element
2 , the top border of the element overlaps the top border of the parent element. The border-top border is the same as its parent element.
3. The top and bottom borders of the element overlap
Suppose there is an empty element, which has a border, but no border or padding. In this case, the top border and the bottom border touch together
4. The superimposed boundary of the empty element overlaps the boundary of another empty element
Recommended related video tutorials: css video tutorial
The above is the detailed content of What is margin overlap. For more information, please follow other related articles on the PHP Chinese website!