I was wondering what the best approach would be to create a 5 column layout in Bootstrap and give those divs a border and spacing.
I've created a new class to make the grid suitable for 5 columns, like so:
.col-xs-15,
.col-sm-15,
.col-md-15,
.col-lg-15 {
position: relative;
min-height: 1px;
}
.col-xs-15 {
width: 20%;
float: left;
}
@media (min-width: 768px) {
.col-sm-15 {
width: 20%;
float: left;
}
}
@media (min-width: 992px) {
.col-md-15 {
width: 20%;
float: left;
}
}
@media (min-width: 1200px) {
.col-lg-15 {
width: 20%;
float: left;
}
}
<div class="item col-md-15">
<div class="item-wrap">
.....
</div>
</div>
What I try to do is to give each column 10px margin on the right (except for last column offcourse). Further I want to give each column or item-wrap
a 1px border.
Whatever I try I always end up with no margin.
.item {
border: 1px solid #efefef;
padding:10px;
}
.item.last {
margin-right: 0;
}
See my fiddle