[thelist] wrapping long content on web pages

Tim Fountain tim at tfountain.co.uk
Sun Aug 11 23:22:01 CDT 2002


On Friday, August 2, 2002, aardvark wrote:

[long URLs etc. breaking designs]
> there are many pages where a member pasted a url into the comment
> box, and it's one of these urls, causing the whole page to splay
> across the screen like a marshmallow in a microwave...

> i'm trying to find a valid, semantically correct, and pleasantly
> simple way to cause words/urls to wrap in a browser...

It's a problem, I and I also have yet to find a decent solution.
There's an IE-specific way of doing it using CSS (word-wrap:
break-word; I think it is), but that only works in MSIE 5.5+ (I think,
it might be IE 6.0+ only) so you can't rely on it.

I wrote a quick PHP function which parses long URLs into clickable
links replacing the text with 'Link', and breaks all other long
strings using hiphens. I'll post the code here if anyone thinks it
might be of use.

--
Tim Fountain (tim at tfountain.co.uk)
http://www.tfountain.co.uk/




More information about the thelist mailing list