PDA

View Full Version : Force text into next line..


Mhtml
04-06-2003, 04:54 AM
I'm having trouble forcing text onto the next line and keeping my cell width at 160 in my shout box I made.

http://mhtml.ithium.net (look at frame source ;))

ASAAKI
04-06-2003, 03:38 PM
you might just try making the width a *little* less.
but it does seem to be working. i wrote a really long message below and it was wrapped fine.
http://www10.brinkster.com/asaakitesting/m.html

Mhtml
04-06-2003, 03:52 PM
lol. :thumbsup:

But I was thinking more about a single word. raf pointed it out to me, but I deleted it to cover up the evidence ;).

He did 123456789010111213141516171819 or similar and it expanded off the map lol. I was thinking more about wrapping that.

Duly noted though, I'll decrease the width a little. :)

ASAAKI
04-06-2003, 08:21 PM
aha! i think this might do it. at least you can specify the number of characters to allow on one line.

scroll down to the javascript, posted by coreyit.
http://www.experts-exchange.com/Web/Web_Languages/HTML/Q_11745599.html

i guess you'll have to use this script to process the string before it gets submitted and goes to the database. but there's some talk of it working properly only with <pre> tags...

apparently there's also a way to get it done using CSS (virtual:soft), which won't work on the major browsers. didn't test it though.