PDA

View Full Version : Text not wrapping in IE



htcilt
Apr 9th, 2010, 02:31 PM
I have a right-floated div that has a fixed width of 270px.
The text within it is from a database.

In one instance the text is Monday/Tuesday/Wednesday/Friday
Because there are no spaces, the line is wider than 270px, does not wrap to the next link and so it goes outside the div boundaries.

This does not happen in Firefox - the word 'Friday' wraps to the next line.

Does anyone know how I can correct this in IE?

abduraooft
Apr 9th, 2010, 02:42 PM
You may apply overflow:hidden; to hide the text beyond the boundary.

htcilt
Apr 9th, 2010, 03:35 PM
Thanks.
But is there a way to get the word to wrap onto the next line rather than hide it?

htcilt
Apr 9th, 2010, 03:39 PM
word-wrap:break-word; is closer to what I'm after.
I suppose I could always to a string replace (I'm using PHP) on the / character to include a space on either side.