Created
June 30, 2014 15:23
-
-
Save tegola/11386f68071219e25f99 to your computer and use it in GitHub Desktop.
Bootstrap - Responsive image align left/center/right
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
/* | |
Align Bootstrap's .img-responsive images in a left, center or right aligned text container | |
Replaces original .img-responsive class | |
*/ | |
// Responsive images (ensure images don't scale beyond their parents) | |
.img-responsive { | |
@include img-responsive(); | |
.text-left & { | |
margin-right: auto; | |
} | |
.text-center & { | |
margin-left: auto; | |
margin-right: auto; | |
} | |
.text-right & { | |
margin-left: auto; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment