Plus 1 button doesn't render properly in IE9

我的未来我决定 提交于 2019-12-25 05:07:32

问题


I noticed recently the Plus 1 button on my company's website doesn't render properly in IE 9 and 10. Looks perfect in Chrome, but can't seem to get it to show up in IE without a chunk being cut off the bottom of the button. Compatability Mode doesn't help. Any tricks to position or pad around the button so it shows up properly? I tried putting the code in table but that didn't help at all, nor does paragraph or break.

Facebook Like button shows up correctly in both IE and Chrome.

Windows Server 2008, IIS 7.5, using the code generated on the developer site.

Thanks


回答1:


You can just add the following code and the browser will force to IE8 mode (which renders correctly):

Add this to the top of your HTML:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Add this to the head section of your HTML

    <meta http-equiv="X-UA-Compatible" content="IE=8" />

The button will then render correctly. See a live example here.



来源:https://stackoverflow.com/questions/19305142/plus-1-button-doesnt-render-properly-in-ie9

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