I have a problem where I have a dynamic part of my page where I might have 1,2,3 or 4 subdivs (look below at the pink arrows). As you can see in the first facebook section, the divs don't stretch out. I want it to be in thirds. If there are only 2, then it should be in halves, and take up the whole width of the container.
How would I do this?
HTML:
<div class="channel-box">
<div class="facebook-engagements">
<img src='blah.img' title="Facebook" />
<span class="small-stats-font">123</span>
</div>
<div class="channel-breakdown clearfix row-fluid">
<div class="channel-units">
<img src='blah.img' title="Post" />
<span class="smaller-stats-font">123</span>
</div>
<div class="channel-units">
<img src='blah.img' title="Like" />
<span class="smaller-stats-font">123</span>
</div>
<div class="channel-units">
<img src='blah.img' title="Share" />
<span class="smaller-stats-font">
123
</span>
</div>
</div>
</div>
CSS:
.channel-breakdown {
border-top: 1px solid gray;
.channel-units {
border-right: 1px solid gray;
display: inline-block;
float: left;
margin-right: 10px;
width: 23%;
}
}