Why does the last green div overflow if I change the width of the blue div from 212px to 211px? Where do the spaces between the green divs vome from?
The developer tools show me no margin, no padding, no border, nothing at all which could produce these gaps. Where do they come from?
212px width --> no overflow
211px width --> overflow
#test {
background-color: blue;
height: 50px;
width: 211px;
}
#test>div {
display: inline-block;
background-color: green;
height: 50px;
width: 50px;
}
<div id="test">
<div></div>
<div></div>
<div></div>
<div></div>
</div>