I think you'll struggle with that centering of the items pushing off the lines, but for the rest of it, you can do something like this:
#main
{
width: 100%;
background-color: blue;
float: left;
}
.redDiv {
width: 16%
background-color: red;
height: 150px;
margin: 2%;
float: left;
}
Given this HTML structure:
<div id="main">
<div class="redDiv"></div>
<div class="redDiv"></div>
<div class="redDiv"></div>
<div class="redDiv"></div>
<div class="redDiv"></div>
<div class="redDiv"></div>
</div>