![]() Have you considered adding margin-right:-0.5em to your span. On the span with letter-spacing: -1px put the following as seen in this fiddle: span:after ` Optional Workaround: :after pseudo-element Probably the "Best" WorkaroundĪdd padding-right: 1px to the span with letter-spacing: -1px to offset the problem as seen in this fiddle. So it does not appear that it works as is should in any browser, nor does it matter if the letter-spacing is instead a positive number. The result being that all appear to be reducing total width by 1px per character in the string. However, this fiddle on Win 7 is showing me that on Chrome, IE9, and Firefox, all are applying one less pixel after the last letter (Firefox is showing me to start out with one less pixel to begin with in the gap to the border), which seems to be in violation of it not being applied to the end of the line. Letter-spacing must not be applied at the beginning or at the end of a I agree that the spec states this fairly explicitly. letter-spacing: -4px Odd effect of letter-spacing on element width The Behavior Letter spacing can have negative value, so try that :) So if someone feels like hacking into webkit that would make a lot of designers happy. This bug has been reported back in 2008 and is confirmed. ![]() ![]() Is there a way to make css letter-spacing: 0.5 px?
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |