Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Letter-Spacing bug with inline elements

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #178422
    bradleyb
    Participant

    Does anyone have a good solution for this letter-spacing bug? Basically if you have an inline element inside of an element that is either floated, or inline-block, and there is a letter-spacing applied to either of the elements, they’re different sizes.

    Codepen – http://codepen.io/anon/pen/vDKyl

    You can see that the P is 1px larger than the SPAN. I know this has to do with sub-pixel values, because if you set the letter-spacing to 1px, then the problem disappears. All my font-sizes are in ems, so it would be weird to have the letter-spacing in px.

    #178443
    Paulie_D
    Member

    All my font-sizes are in ems, so it would be weird to have the letter-spacing in px.

    You’re trying to solve a particular issue with a simple fix…I’d go with it in this instance…or just use a decimal rem value.

    1px = 0.0625rem @ 16px for instance.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.