Last active
August 29, 2015 14:06
-
-
Save JayHoltslander/e464ac3ac8f3814999a9 to your computer and use it in GitHub Desktop.
Edge to edge Bootstrap columns
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"> | |
<section class="edge-to-edge"> | |
<div class="row"> | |
<div class="col-xs-4"> | |
<img class="img-responsive" src="http://placehold.it/640x480/777" alt=""> | |
</div> | |
<div class="col-xs-4"> | |
<img class="img-responsive" src="http://placehold.it/640x480/333" alt=""> | |
</div> | |
<div class="col-xs-4"> | |
<img class="img-responsive" src="http://placehold.it/640x480/555" alt=""> | |
</div> | |
</div> | |
</section> | |
</div> |
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
.edge-to-edge { | |
padding-top: 0; | |
padding-bottom: 0; | |
.row { | |
margin-left: 0; | |
margin-right: 0; | |
} | |
div[class*='col-'] { // Apply to all column(s) inside the row | |
padding-left: 0; | |
padding-right: 0; | |
img { | |
.img-responsive; // Make images fit better | |
} | |
} | |
} | |
.container > .edge-to-edge { | |
margin-left:-15px; // Offset for when nested in a .container | |
margin-right:-15px; // Offset for when nested in a .container | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment