Search code examples
htmlcssalignmentword-wrap

IMG Align with word-wrap issue?


Please look at my code on this jsfiddle. Why is the text not wrapping around the image? I have the wordbreak code in there. Did I put it in the wrong place or what?

Jsfiddle

Is use these two word wraps inside my code, as far as I know...

style="word-wrap: break-all;"

style="word-wrap: break-word;"

Solution

  • Just made an example for you: http://jsfiddle.net/HBsxK/1/

    There are green and red paragraphs with an image. Both are the same, but the text is different inside paragraphs.

    Upper one (green) is the one you mean?

    The lower one has the same problem as with your fiddle: the text has no word breaks (spaces) and it has no meaningful words (how the browser knows, how to hyphenate or break in meaningful way something like "dgkl;fgdkl;fdgkl;fgdk;fdgk;dfgskljfdgjkldfgk;dfgsk;dfgskfdgkfgdkl;fgjd;flkgjdfgdfgsdfgjkdfgjdfgdfgdfgjfdgsjf" because human cannot know).