HTML:
CSS:
#parent {
text-align: center;
width: 600px;
background: grey;
}
.child {
display: inline-block;
width: 120px;
height: 100px;
margin-top: 30px;
}
.child:first-child {
background: teal;
}
.child:last-child {
background: steelblue;
}