.square {
width: 3em;
height: 3em;
background-color: black;
display: inline-block;
}
* {
margin: 0;
padding: 0;
border: 0;
}
<div><!--
--><div class="square"></div><div class="square"></div><!--
--></div><!--
--><div><!--
--><div class="square"></div><div class="square"></div><!--
--></div>
Expected behavior: the lower two squares are located directly below the upper two squares, visually forming one big square
Actual behavior: for some unknown to me reason the parent divs each have an extra line below their contents, resulting into a gap between two upper and two lower squares