Created
December 11, 2018 01:24
-
-
Save hefhuman/f61eddd89934d7d0f6fcf96a83cc218d to your computer and use it in GitHub Desktop.
removing white space on inline-block in two ways
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
/*Method 1*/ | |
.parent{ | |
font-size: 0; /*This one do the trick*/ | |
} | |
.inline-block_{ | |
display: inline-block; | |
width: calc(100% / #); /*Change # number of columns you like*/ | |
height: 300px; | |
} | |
/*Method 2*/ | |
.inline-block_{ | |
display: inline-block; | |
width: calc(100% / #); /*Change # number of columns you like*/ | |
height: 300px; | |
margin-left: -5px; /*This one do the trick*/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment