I'd like six percentage-width divs to be spaced evenly along a 100% width div, filling up the entire 100% width, but with a small margin between them.
Here is a JSFiddle showing the issue:
Or code here:
<div class="container">
<div class="inner red"> </div>
<div class="inner orange"> </div>
<div class="inner yellow"> </div>
<div class="inner green"> </div>
<div class="inner blue"> </div>
<div class="inner purple"> </div>
</div>
div {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.container {
width: 100%;
}
.inner {
width: 16%;
display: inline-block;
margin: 1px;
}
Currently the margin is causing them to break across two lines.
I've found some hacks for similar problems, but I am not sure how to apply them to my specific issue.