text-overflow:ellipsis doesn't work on IE

早过忘川 提交于 2019-12-17 09:45:56

问题


In this page there are some links at the left sidebar that get cropped with:

.widget-area .textwidget li {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

In Firefox/Chrome it's displayed properly:

Unfortunately Internet Explorer 8/9/10...:

The problem isn't IE 10 support for text-overflow:ellipsis.. for example this works on IE 10 too! What's wrong with my implementation? I also tried to add -ms-text-overflow:ellipsis, without any luck.


回答1:


Removing the word-wrap: break-word property should help.




回答2:


add width property to your CSS code..this would help..




回答3:


For IE you should add some extra code..like changing ur width property..or try using a dotdotdot jquery plugin..that would be an alternate solution.. Like this

http://dotdotdot.frebsite.nl

Edit: Follow this link

Quirksmode textoverflow

which tells you to set the width:100% for IE..



来源:https://stackoverflow.com/questions/14664195/text-overflowellipsis-doesnt-work-on-ie

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