Skip to content

Instantly share code, notes, and snippets.

@hefhuman
Created December 11, 2018 01:24
Show Gist options
  • Save hefhuman/f61eddd89934d7d0f6fcf96a83cc218d to your computer and use it in GitHub Desktop.
Save hefhuman/f61eddd89934d7d0f6fcf96a83cc218d to your computer and use it in GitHub Desktop.
removing white space on inline-block in two ways
/*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