I'm having this site with a n number of tiles (the yellow elements in the picture). When the sites gets too small to put them on one line it obviously put them in a second row. But somehow it has this space between them. There are no spaces in between the elements in the source. Does anyone know how I can remove this space? I know I could use a table, but is there really no easier method?
The tiles (yellow) in their container (blue)
.container {
position: absolute;
left: 10px;
top: 10px;
width: 50%;
background-color: rgba(66, 134, 244, .2);
padding: 5px;
}
.item {
height: 150px;
width: 150px;
display: inline-block;
box-sizing: border-box;
background-color: rgba(232, 223, 55, .2);
box-sizing: border-box;
border: 1px solid black;
}
<div class="container"><div class="item"></div><div class="item"></div><div class="item"></div><div class="item"></div><div class="item"></div></div>