I have tried playing around with z-index
and with position
, but I can't get the hair-main
div to stack behind the head
div. Obviously I want the child div to sit behind the parent.
.goals {
align-items: center;
background: #e3e3e3;
display: flex;
grid-row: 3/4;
height: 500px;
width: 100vw;
}
.circle {
display: table-cell;
/*vertical-align: middle;*/
background: #3c759a;
border-radius: 100%;
height: 300px;
overflow: hidden;
position: relative;
width: 300px;
}
.body {
background: #222;
border-radius: 35px;
height: 400px;
left: 75px;
position: relative;
top: 170px;
width: 150px;
}
.head {
background: #ffe4be;
border-radius: 20px;
height: 100px;
left: 100px;
position: absolute;
top: 80px;
width: 100px;
}
.hair-main {
background: #e7ab57;
border-radius: 34px 34px 0px 0px;
height: 70px;
left: -10px;
position: relative;
top: -10px;
width: 120px;
}
<div class="goals">
<div class='circle'>
<div class='body'></div>
<div class='head'>
<div class="hair-main"></div>
</div>
</div>
</div>