I want the container div (#a-container in this example) to fit the width of its children, that are inline-block divs. In this example, I want the #a-container
div to be just the size of 2 .a div. Is it possible? (pure CSS please)
#a-container {
width: 250px;
background-color: gray;
}
.a {
background-color:blue;
width:100px;
height: 100px;
display:inline-block;
}
<div id="a-container">
<div class="a"></div>
<div class="a"></div>
<div class="a"></div>
</div>