<div class="parent">
<div class="child blue">
</div>
<div class="child pink">
</div>
</div>
.pink {
background-color: pink;
}
.blue {
background-color: blue;
}
.parent {
background-color: gray;
height: 400px;
}
.child {
height: 100px;
width: 100px;
}
body {
min-height: 800px;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.