Does anyone have an idea / explanation why this code affects the anchestors in it's vertical position? This effect take place at least in chrome v75 and firefox v67 on linux.
Actually I would expect:
- no affect on any parent-element of this two children
- the first child on top aligned
- second child followed by first child, fully visible
.abs {
position: absolute;
width: 100%;
height: 100px;
background: red;
}
.static {
margin-top: 100px;
background: blue;
height: 200px;
width: 100%;
}
<header>
<div class="abs">Absolute or fixed should have no space to the top</div>
<div class="static"></div>
</header>