Home > Article > Web Front-end > How to solve the impact on the parent element after setting margin-top on the child element
Solution:
1. Add: overflow:hidden.
to the parent element2. Add a border to the parent element;
3. Add padding to the outer container.