Home  >  Article  >  Web Front-end  >  How to solve the impact on the parent element after setting margin-top on the child element

How to solve the impact on the parent element after setting margin-top on the child element

WBOY
WBOYOriginal
2016-09-23 03:30:13986browse

Solution:

1. Add: overflow:hidden.

to the parent element

2. Add a border to the parent element;

3. Add padding to the outer container.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn