<div id="container">
<div>1</div>
<div>2</div>
<div>3</div>
</div>
#container {
width: 200px;
height: 100px;
display: flex;
border: 2px solid purple;
flex-direction: row;
align-items: center;
}
#container div {
width: 40px;
height: 40px;
line-height: 40px;
padding: 4px;
text-align: center;
font-size: 20px;
background: greenyellow;
background-clip: content-box;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.