Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Seven Equal Columns in bootstrap.
@media (min-width: 768px) {
.seven-cols .col-md-1,
.seven-cols .col-sm-1,
.seven-cols .col-lg-1 {
width: 100%;
}
}
@media (min-width: 992px) {
.seven-cols .col-md-1,
.seven-cols .col-sm-1,
.seven-cols .col-lg-1 {
width: 14.285714285714285714285714285714%;
}
}
@media (min-width: 1200px) {
.seven-cols .col-md-1,
.seven-cols .col-sm-1,
.seven-cols .col-lg-1 {
width: 14.285714285714285714285714285714%;
}
}
<div class="container">
<div class="row seven-cols">
<div class="col-md-1">Col 1</div>
<div class="col-md-1">Col 2</div>
<div class="col-md-1">Col 3</div>
<div class="col-md-1">Col 4</div>
<div class="col-md-1">Col 5</div>
<div class="col-md-1">Col 6</div>
<div class="col-md-1">Col 7</div>
</div>
</div>
@evasmythe
Copy link

evasmythe commented Nov 23, 2015

when utilizing hubspot, where do you place this information?

@corbacode
Copy link

corbacode commented Apr 12, 2016

thanks, very uesful !

@mklahorst
Copy link

mklahorst commented Oct 29, 2016

Perfect!

@Baso1st
Copy link

Baso1st commented Nov 15, 2017

for bootstrap 4 which uses flex you have to add
max-width: 14.285714285714285714285714285714% !important;
flex:none !important;

@thelucas15
Copy link

thelucas15 commented Jul 13, 2020

Thanks for Bootstrap 4 update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment