As you can see by running below snippet, if all divs have no text or all divs have text have text then they will be on the same line. However if one or more are empty while the rest have text they do not appear on the same line. Why does this happen? And how to overcome it?
.Outer
{
border: 1px solid black;
}
.D
{
width: 50px;
height: 20px;
display: inline-block;
background-color: lightblue;
margin: 10px;
text-align: center;
}
<div class="Outer">
<div class="D"></div>
<div class="D"></div>
<div class="D"></div>
</div>
<br>
<div class="Outer">
<div class="D">abc</div>
<div class="D"></div>
<div class="D"></div>
</div>
<br>
<div class="Outer">
<div class="D">abc</div>
<div class="D">abc</div>
<div class="D">abc</div>
</div>