Created
June 22, 2014 01:53
-
-
Save soderalohastrom/ee7fb4560ed93f8d5d9b to your computer and use it in GitHub Desktop.
Using list elements with negative margins
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
img { | |
display: block; | |
max-width: 100%; | |
} | |
.gallery { | |
ul { | |
@extend .cfx; | |
list-style: none; | |
margin: -.25em; | |
padding: 0; | |
} | |
li { | |
@include box-sizing(border-box); | |
float: left; | |
padding: .25em; | |
width: 25%; | |
@media (min-width: $media-tablet + 1) and (max-width: $media-desktop) { | |
width: 33.33%; | |
} | |
@media (max-width: $media-tablet) { | |
width: 50%; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment