IE8 font-size toggles on :hover - Japanese lang only

怎甘沉沦 提交于 2019-12-03 12:57:08

I work for a Japanese site and recently came across this issue. After spending more time than was reasonable, I found the answer from these detailed write-ups in Japanese:

The top link includes the ways to deal with it. For those who can't read Japanese I will summarize:


The problem only affects IE8 showing pages using the MS P Gothic font (generally the default Japanese font on Windows) at a font-size that is between 9px and 11px. Unlike many IE bugs, it has nothing to do with floats/margins/line-height/etc. As Oldie has pointed out, the bug is not consistent, sometimes it happens right away and sometimes it takes a few hovers, and it seems to enlarge/shrink the text randomly.

The three primary solutions are as follows:

  1. Set the font to MS Gothic or some other Japanese font using font-family style.
  2. Change the font size to be anything outside the 9px ~ 11px range (Under the default IE8 font settings, 1em sized text will not be affected, but slightly smaller text (eg, 0.8em) will be affected).
  3. Force IE8 to display the page as if it was IE7 by adding the following in the header:
    <meta http-equiv="X-UA-Compatible" content="IE=7" />

I went with #2 because MS Gothic looked jarring next to all the other MS P Gothic text, and felt #3 had clear disadvantages for our site.

It's not an ideal solution, but it works. Best of luck.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!