After adding a margin-top to one of my nested divs, the surrounding divs are being pushed down unexpectedly. I have searched for solutions on various forums and tried suggestions such as using overflow:hidden/auto, adding a border, or applying a margin/padding of 1px, but none of them seem to be resolving the issue. This is the current structure:
.added-margin {
display: flex;
flex-direction: column;
margin-top: 50px;
}
.div-three {
display: flex;
flex-wrap: wrap;
margin-right: 0;
margin-left: 0;
}
<div class="div-one">
<div class="div-two">
<div class="div-three">
<div class="other-div"></div>
<div class="added-margin">This div has a margin of 50px and contains other nested divs</div>
</div>
</div>
</div>