html - Use text-overflow: ellipsis on an anchor tag -


how can make <a> tag use text-overflow: ellipsis property? have long link names truncate.

here attempt using usual text-overflow approach.

http://jsfiddle.net/2wg8n/

you'll need change display: block; or else inline-block , specify width, e.g:

a {     width: 50px;     display: block;     white-space: nowrap;     text-overflow: ellipsis;     overflow: hidden; } 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -