You could use vw (view-width) units, which would make the squares responsive according to the width of the screen.
A quick mock-up of this would be:
html,_x000D_
body {_x000D_
margin: 0;_x000D_
padding: 0;_x000D_
}_x000D_
div {_x000D_
height: 25vw;_x000D_
width: 25vw;_x000D_
background: tomato;_x000D_
display: inline-block;_x000D_
text-align: center;_x000D_
line-height: 25vw;_x000D_
font-size: 20vw;_x000D_
margin-right: -4px;_x000D_
position: relative;_x000D_
}_x000D_
/*demo only*/_x000D_
_x000D_
div:before {_x000D_
content: "";_x000D_
position: absolute;_x000D_
top: 0;_x000D_
left: 0;_x000D_
height: inherit;_x000D_
width: inherit;_x000D_
background: rgba(200, 200, 200, 0.6);_x000D_
transition: all 0.4s;_x000D_
}_x000D_
div:hover:before {_x000D_
background: rgba(200, 200, 200, 0);_x000D_
}
_x000D_
<div>1</div>_x000D_
<div>2</div>_x000D_
<div>3</div>_x000D_
<div>4</div>_x000D_
<div>5</div>_x000D_
<div>6</div>_x000D_
<div>7</div>_x000D_
<div>8</div>
_x000D_