Last active
August 29, 2015 14:05
-
-
Save WolfgangDrescher/a4ffe367fdabba558cdf to your computer and use it in GitHub Desktop.
Resets expanding cols in Bootstraps gird system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class="row"> | |
<?php foreach(GalleryAlbum::findAll() as $key => $album): ?> | |
<div class="col col-xs-12 col-sm-6 col-md-4 col-lg-3"> | |
<!-- col content, gallery image--> | |
</div> | |
<div class="clearfix visible-xs-block<?php | |
if(($key + 1) % 2 == 0) { | |
echo ' visible-sm-block'; | |
} | |
if (($key + 1) % 3 == 0) { | |
echo ' visible-md-block'; | |
} | |
if (($key + 1) % 4 == 0) { | |
echo ' visible-lg-block'; | |
} ?>"></div> | |
<?php endforeach; ?> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment