Doing it with style
Beatles Records
Beatles Records
For further information on text-overflow see the W3.org specification - CSS3 'text-overflow'
This demonstration is produced in collaboration with Román Cortés
Sometimes it is necessary to truncate lines of text so that they fit within a set size of box and using the 'text-overflow' style the extra text can be made to show on hover.
The text-overflow:ellipsis; style is supported by all modern browsers including IE6, IE7 and IE8 so the first demo shows the 'ellipsis' three dots to indicate extra text (except in Firefox) and hovering over the text will show the missing text.
However, we thought that it would be nice to be able to indicate extra text using a small graphic so the second demonstration has the same unordered list but with slightly different code and styling so that if the text has an overflow then the graphic is added, but if there is no overflow then there will be no visible graphic. This also works in all modern browsers including IE6, IE7 and IE8.
Tested in IE6, IE7, IE8, Firefox, Opera and Safari(PC) and Chrome.
Because of all the time and effort spent in producing this demonstration I would ask that you respect my copyright.
Your donations keep CSS PLAY running.
If your donation is for the use of a demo then please email me with the demo url after making your donation.