<div class="flex-container"> <div class="flex-item">flex item 1</div> <div class="flex-item">flex item 2</div> <div class="flex-item">flex item 3</div> </div>
.flex-container { display: -webkit-flex; display: flex; -webkit-justify-content: center; justify-content: center; width: 250px; height: 240px; background-color: #ccc; } .flex-item { background-color: #f36915; color: white; width: 70px; height: 70px; margin: 5px; }