div { box-sizing: border-box; } .board { width: min(84vw, 84vh); margin: 10px auto; outline: 1px solid black; } .board .field { border: 1px solid black; width: min(12vw, 12vh); height: min(12vw, 12vh); display: flex; align-items: center; justify-content: center; float: left; } .board .row .field:first-child { clear: both; } .board .field .piece { width: 95%; height: 95%; border-radius: 50%; } .board .field .blue { background-color: blue; } .board .field .red { background-color: red; }