line break in code adds white space between elements.

line break in code adds white space between elements, specifically inline-block elements. 

One fix is to add display:flex to the parent element. This doesn’t seem to work for Safari.

Another fix is to add font-size: 0 to the parent element. This still didn’t work for Safari.

There’s some very hacky fixes, like adding negative margins, or adding comments.

Thank you for reading!

It's only fair to share...Tweet about this on Twitter
Twitter
Share on Facebook
Facebook
Email this to someone
email
This entry was posted in HTML/CSS, HTML5. Bookmark the permalink.