I'm trying to make an advent calendar using Bootstrap 3.3.7 similar to the one here http://2015.itsashapechristmas.co.uk/
The markup I'm using is
<div class="container">
<div class="row grid">
<div class="col-md-2 grid-item">1</div>
<div class="col-md-2 grid-item">2</div>
<div class="col-md-2 grid-item">3</div>
<div class="col-md-2 grid-item">4</div>
<div class="col-md-2 grid-item">5</div>
<div class="col-md-2 grid-item">6</div>
</div>
<!-- Repeat -->
</div>
Where I've put
I'm using similar columns of 6 numbers inside <!-- Repeat -->
.col-md-2
I wanted to make the numbers appear centered and square (as per the example link) so used this:
.grid {
font-size: 48px;
}
.grid-item {
padding: 60px;
text-align: center;
}
Ideally I wanted this to collapse into smaller columns when the viewport is resized, but at the breakpoint for .col-md-2
it just collapses into a single column.
Am I doing this the correct way or are there better ways to achieve this?