Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ellipsis not working well in firefox but works in chrome

Tags:

html

css

ellipsis

I was trying to make a link restricted to a width using the ellipsis.

The html is something like this:

<a class="blueLink2 destination-url-space" style="top:0;" href="http://google.com/uyv245">http://google.com/iuh345345345gthrthrthrth</a>

and the CSS is

.blueLink2 {
    color: #0051A1;
    display: inline;
    font-size: 14px;
    margin-left: 5px;
    overflow: hidden;
    position: relative;
    text-overflow: ellipsis;
    top: 0;
}
.destination-url-space {
    display: inline-block;
    max-width: 200px;
    overflow-x: hidden;
}

But it's working only in Chrome. Not working in Firefox. Demo: http://jsfiddle.net/xE6HG/

like image 696
user1012181 Avatar asked Jan 14 '23 08:01

user1012181


1 Answers

you need to add white-space: nowrap; there

DEMO

like image 178
Sowmya Avatar answered Jan 18 '23 22:01

Sowmya