continuation ellipsis instead of wrapping of text

220 views
Skip to first unread message

Sam Halliday

unread,
Apr 17, 2008, 5:50:54 PM4/17/08
to Google Web Toolkit
Hi all,

I have a UI issue where wrapping (or overflowing) of text inside a
resizable region looks really bad, and what I'd really like to do is
to show some ellipsis (i.e. three dots ...) instead of wrapping the
word.

For example, consider the case where you have a single resizable table
containing the text "slowly slowly catch a monkey". If word wrapping
is turned off, this text will be wider than the column width, and
overflow. However, if wrapping is enabled then the words will be
broken onto separate lines. What I'd like is for the overflowing text
to be removed altogether and the only text left on the display to be
"slowly slowly..." (depending on the width of the table).

Is it possible to do something like this?

Going even further, would it be possible to do it on a single word...
for example "discombobulated" that would be trimmed and ellipsis
inserted at the appropriate point.

This is a very "Apple" approach to dealing with long pieces of text in
resizable areas :-)

TheB...@gmail.com

unread,
Apr 17, 2008, 8:03:18 PM4/17/08
to Google Web Toolkit
css style overflow hidden?

Sam Halliday

unread,
Apr 18, 2008, 3:26:45 AM4/18/08
to Google Web Toolkit
unbelievable... I never knew that existed! Thanks a bunch TheBuzzer.

Sam Halliday

unread,
Apr 18, 2008, 3:43:28 AM4/18/08
to Google Web Toolkit
TheBuzzer, that wasn't exactly what I wanted, but your pointer led me
to

text-overflow:ellipsis;

which I found on http://www.blakems.com/archives/000077.html

That appears to do exactly what I want, and seems to work in IE and
Safari 3, but not Firefox 2. Not perfect, but a workable solution.

On Apr 18, 1:03 am, "TheBuz...@gmail.com" <TheBuz...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages