IE9 letter-spacing problem

前端 未结 9 1599
予麋鹿
予麋鹿 2021-02-05 09:11

I have a page that renders ok, in FF (3x, 4x), Chrome, IE (6, 7, 8).

When tested on IE9 the texts are wider. Investigating the problem it appears that the text is actu

9条回答
  •  天命终不由人
    2021-02-05 09:56

    Try this as this work with Internet Explorer 8 and Firefox:

    letter-spacing:0.49px;
    letter-spacing:0.88px !ie;
    

    MSIE will floor the first letter-spacing to 0px and ignore the second rule. Firefox will read the second rule and use it instead of the first rule.

    Then, to compensate, you can use the same trick and add more horizontal padding to your text in MSIE that what you give to in Firefox.

    Of course, make further tests with other browsers!

提交回复
热议问题