View Full Version : div tag width - stop width resize?
homerUK
03-21-2003, 10:13 AM
Hey,
I have a DIV layer with contenteditable="on" .... it all works perfectly until the user types a long string such as "ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" then in stead of wrapping the text to the next line, it resizes the div tag in width to accomodate the long string.
I need it to wrap the text. I've tried using nowrap="false" and other things, but I'm pretty stuck now!
Many thanks for any help!!
brothercake
03-21-2003, 10:51 AM
try this
<div style="width:500px;overflow:wrap">
homerUK
03-21-2003, 11:00 AM
hey,
thanks for the reply, i tried that and it still dont work! :(
here's the URL as an example...
http://www.thebluenowhere.co.uk/tmp.htm
I wonder if there's a Javascript function to listen to the window?
Spudhead
03-21-2003, 02:41 PM
It looks as though it's working to me. 4 divs, all width-specified, all with content wrapping according to the width. Am I missing something?
homerUK
03-21-2003, 02:43 PM
it wraps ok when you enter small words... but when you enter
"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd d"
all as one string, it stretches the div layer!!
eggman
03-21-2003, 04:19 PM
It seems the best you can expect is overflow:auto or overflow-X:auto which is probably not the effect you want though. :(
Hi,
I have this problem also.
This is what I did:
------------------------------
<tr>
<td colspan="2">
<div style="width:200px;overflow:wrap">
<font size="2" face="Arial">
dfdfdfdfdfdfdfdfddfdfdfdfdffdfwewqeqewqeqweqe
</font></div></td></tr>
------------------------------
Can anyone help me modify it, so that the text will wrap?
Thanks very much.
It will not wrap because something like
dddddddddddddddddddddddddddddddddddddddd
is all one word.
Text is wrapped from an appropriate space
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.