Last active
September 18, 2016 18:05
-
-
Save simbasounds/8b5b1363066d2150d6904be928b0aa5c to your computer and use it in GitHub Desktop.
This code will remove the borders around WordPress gallery images and change the layout model to CSS flexbox.
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
.gallery { | |
display: -webkit-box; | |
display: -ms-flexbox; | |
display: flex; | |
-ms-flex-wrap: wrap; | |
flex-wrap: wrap; | |
-webkit-box-pack: justify; | |
-ms-flex-pack: justify; | |
justify-content: space-between; | |
} | |
.gallery br { | |
display:none; | |
} | |
.gallery-item { | |
-ms-flex-preferred-size: 16%; | |
flex-basis: 16%; | |
margin: 0 !important; | |
} | |
@media only screen and (max-width: 760px) { | |
body .gallery-item { | |
-ms-flex-preferred-size: 32%; | |
flex-basis: 32%; | |
} | |
} | |
.gallery-item img { | |
border: none !important; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment