parent
child
parent still

Above is a case of a parent DIV with a child DIV and no margins. Part of the pink parent is behind the green of the child. The dotted line is a following element with no top margin.


.parent1 {background: #cfc; color: #000;  height: 100px;}
.child1 {background: #fcc; color: #000; height: 50px;}

<div class="parent1">
<div class="child1"></div>
</div>

Previous is the parent and child with no margins.

Next is the parent and child with bottom margins.