div.grid { display: inline-block; } .grid div { -webkit-transition: background-color 0.3s ease-out; -moz-transition: background-color 0.3s ease-out; -o-transition: background-color 0.3s ease-out; transition: background-color 0.3s ease-out; user-select: none; } .gridCell div div { height: 20px; width: 20px; margin: 2px; display: inline-block; cursor: pointer; } .smallGridCell div div { height: 15px; width: 15px; margin: 1px; display: inline-block; cursor: pointer; } .gridRow div { height: 24px; text-align: center; } .smallGridRow div { height: 17px; text-align: center; }