I have a header div as the first element in my wrapper div, but when I add a top margin to a h1 inside the header div it pushes the entire header div down. I realize this ha
This happens because of margin collapse. When child element touches the boundary of parent element and any of them applied with margins then :
The margin which is largest will win (applied).
if any of them having margin then both will share the same.
Solutions