Removing space between elements with inline-block
If you use display: inline-block </code> in CSS for align elements you can notice that exist space between the elements, if you wanna remove this space you have to put the container to font-size: 0 </code> and the elements using inline-block </code> you have to assign the font-size </code> to whatever unit you want.
ul {
font-size: 0;
margin: 0;
}
li {
display: inline-block;
font-size: 1em;
}
Written by Mikhail Cruz Andrade
Related protips
2 Responses

This was very useful for me.
over 1 year ago
·

thanks for the tip :).
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#