.chessboard{ display: grid; } .chessboard *{ height: 30px; text-align: center; } .l, .d, .h, .empty{ width: 30px; float: left; } .d{ background-color: #f59b42; } .l{ background-color: #fadbbb; } img{ width: 25px; }