Why doesn't top: 0 work on absolutely-positioned elements relative to body?
You can see in the code below that the h1 pushes down the body and the absolutely-positioned block .absolute does not stick to the top. But you also can see that the same block is stuck to the top of its parent .wrapper . Why? I'm not asking how to do that trick; I know how, e.g. padding instead margin to h1, or clearfix to parent and so on. I'm interested in only one thing: why h1 's margin pushes down the body , but is not pushing down .wrapper ? body { position: relative; margin: 0; padding: 0; overflow: hidden; background-color: silver; } .absolute { position: absolute; top: 0; left: 0;