Sub-pixel letter-spacing in CSS

There’s a thread on the Sitepoint forums about the smallest amount of letter-spacing you can use. Most of the responses are useless, annoying and wrong, but #36 finally gives a good answer.

Most browsers only support integer pixel values for letter-spacing. This is a problem because, when it comes to letter-spacing, there’s a big difference between 0 and 1px. Ems and other relative units are converted to pixels before rendering, so they won’t work either. It looks like Firefox is the only browser that currently supports sub-pixel rendering.

So, you can use something like .5px for Firefox, but other browsers will round to an integer.

Leave a Reply

Your email address will not be published. Required fields are marked *