View Full Version : word wrap in Mozilla?

05-30-2005, 03:36 PM
hi. I was wondering if someone could help me out. I've got a website (joeratt.com) and on there I have a guest book. Well one of my programming buddies showed me that I needed to wrap the words. So I did, but it didnt work in Mozilla.

<div style="position:absolute; word-wrap: break-word; left:254px; width:470;">

is there a way to make this work in mozilla too?

05-30-2005, 03:38 PM
ok so it doesnt work on netscape either... hm... is there a way to do this?

05-30-2005, 04:07 PM
It's not valid HTML or CSS, try making it validate, then try again.

05-30-2005, 04:23 PM
And it's in a php code box... lol


<div style="position:absolute; white-space: nowrap; left:254px; width:470px;">

05-30-2005, 07:12 PM
is nowrap what i want?

05-30-2005, 09:29 PM
No, you want word-wrap; unfortunately, it's IE-only. Moz doesn't support it. You might have to try some scripting if you're looking for a specific effect.

05-31-2005, 12:49 AM
what do you mean... sorry.. im lost

05-31-2005, 03:14 AM
I mean, "word-wrap" will give you what you are looking for, not "nowrap." Internet Explorer is the only browser that supports "word-wrap."

For Mozilla, there is no CSS based code that'll give you the effect of breaking and wrapping a word. So you will need to use some Javascript or PHP to emulate that for you.

05-31-2005, 05:01 AM
ok now i understand... but is tehre a way to be all browser compatable?

05-31-2005, 05:37 AM
Safari 1.3 and up also supports it.

05-31-2005, 05:10 PM
ok now i understand... but is tehre a way to be all browser compatable?
errrehmm... as far as I know the only way to do that is use some Javascript or PHP to emulate the effect you're looking for.