Ian McNally

<li> inline-block margin

May 06, 2014

I noticed a funny thing the other day.

If you set a group of <li> elements to display: inline-block, you get an awkward 4px-or-so margin on either side. The best solution I’ve found is to font-size: 0 on the <ul>.


Ian McNally

Hey, I'm Ian. I build websites and write about what I learn as I go. Follow me on Twitter.