Forum Moderators: not2easy

Message Too Old, No Replies

How do you force word wrap on long words

         

smithaa02

9:54 pm on Jan 14, 2009 (gmt 0)

10+ Year Member



Say I have a container 50px wide, but a word like asdfasdfasfasfasdfasfasdfadsfasdf that is more then 50px wide. When I test this, the long word jumps out of its container while I would prefer it would just wrap to the next line.

Is this not possible because there is no 'white space' in this long line, or is there a CSS trick that can make this work?

sectionq

10:38 pm on Jan 14, 2009 (gmt 0)

10+ Year Member



You can use word-wrap:break-word only works in ie though I'm afraid, think you'll have to live with the rest jumping out of your boxes.

sQ

simonuk

8:50 am on Jan 15, 2009 (gmt 0)

10+ Year Member



If you add display:inline the nice modern browsers will also play ball.

simonuk

8:52 am on Jan 15, 2009 (gmt 0)

10+ Year Member



Just saw your "wrap to next line". My solution keeps it in the div but continues it on the same line so won't help you.