Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

text-overflow:ellipsis doesn't work on IE

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: Screenshot from Firefox/Chrome

Unfortunately Internet Explorer 8/9/10...: Screenshot from IE 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.

like image 897
MultiformeIngegno Avatar asked Feb 02 '13 16:02

MultiformeIngegno


People also ask

Why is text-overflow ellipsis not working?

text-overflow: ellipsis only works when the following is true: Parent element is not set to display: inline (span's default,) You must use display: block or display: inline-block. The element's width must be constrained in px (pixels) – it doesn't work with values specified using % (percent.)

How do I force text-overflow ellipsis?

To force overflow to occur and ellipses to be applied, the author must apply the nowrap value to the white-space property on the element, or wrap the content in a <NOBR> tag.

Can I use text-overflow ellipsis?

Definition and Usage. The text-overflow property specifies how overflowed content that is not displayed should be signaled to the user. It can be clipped, display an ellipsis (...), or display a custom string.


1 Answers

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

like image 65
duri Avatar answered Sep 23 '22 12:09

duri