I've read that:
The top and bottom margins of blocks are sometimes combined (collapsed) into a single margin whose size is the largest of the individual margins (or just one of them, if they are equal), a behavior known as margin collapsing. Note that the margins of floating and absolutely positioned elements never collapse.
So, what can cause this behaviour?
* {
margin: 0;
padding: 0;
}
.block {
width: 500px;
height: 500px;
background: rgba(4, 127, 214, .3);
position: absolute;
}
.block_2 {
margin-top: 500px;
width: 500px;
height: 500px;
background: red;
}
<div class="block"></div>
<div class="block_2"></div>
That margin-top should move my red element down in theory... Why doesn't this happen?