please take a look to the snippet below. I honestly can't get why the absolute positioned element (red) is not overlapping the other one. Why?
I all comes from analyzing a more complex case with some animations on a slideshow which I wanted to replicate. And they are take advantage of this strange (at least to me) behaviour, along with some other absolute-pos-in-flex-container related things.
Anyway, I tried to simplify the thing down to the bone and that's it. Why isn't the description overlapping the caption?
.caption{
background-color: rgba(0, 0, 0, .2);
}
.description{
position: absolute;
background-color: rgba(250, 0, 0, .7);
}
<div class="caption">caption</div>
<div class="description">description</div>