Chris’ solution didn’t work for me since I had a border around my text (a button) as well – so I added a “text indent” instead using this bit of css: text-indent: 15px; Obviously replace the 15px with whatever value your letter spacing is. Works great.
]]>Got here from a google search of letter-spacing. Chris’ hack seems to work nicely!
]]>Anyone?
Thank you!!!
]]>Nitpicking, but I think a better way to say this would be “does not replace the default” rather than “does not change the default”.
]]>(however, a patch for Webkit support was submitted 10 months ago. Current status is unknown, but it is coming.)
With DirectWrite enabled for everybody since chrome 37, chrome now also supports sub-pixel values for letter spacing and font-size. However, at the moment end-users can disable direct write in chrome://flags if they desire.
]]>Small Comment.
SVG support for firefox for letter-spacing and word-spacing is still not here, there’s a known bug.
]]>Just stumbled on a similar issue myself.
I’ve done a bit of testing and it seems that that last letter also generates the letter-space which creates the visual imbalance in the layout.
I found this simple workaround to correct things:
h2 {
font-family: ‘Oswald’, sans-serif;
font-size: 1.25em;
text-transform: uppercase;
color: #dca013;
font-weight: 300;
letter-spacing: 1em;
padding: 0 0 0 1em; /* compensates for the extra spacing */
}
(although my instinct suggests it should be .5em)
]]>Well, the problem with that if letter spacing is static, it loses the ability for it to be truly responsive to the width of the container. I ended up wrapping each letter in a and defining a width of 4% on each character. (There’s 25 characters = 100% width). Seems to work out just fine. Although, I do lose the SEO benefit for that string of words. I suppose I can use javascript to wrap each character with a on page load to regain the benefit.
]]>Wouldn’t box-sizing: border-box; resolve the issue?
]]>I’ve also got this issue. Letter-spacing appears to add a bit of space to the end of the word on the right. In box-model terms, it’s the element itself (i.e. not margin or padding) which is proving to be a bit of a problem.
]]>