0

I did something wrong in this document and I can´t figure what. I've not that much content yet. I'm building it for a WB. It's not working in Google Chrome but in Internet Explorer it is.

http://privat.bahnhof.se/wb802226/tesing.html

Could somebody look into the source code and look for an error?

I want to make the long <span> break. I want to make the <span> a <pre>. And I want the <pre> autobreaking aswell. Any ideas?

Sam DeHaan
  • 10,246
  • 2
  • 40
  • 48
Xweque
  • 605
  • 1
  • 9
  • 29
  • Isn't this an unrealistic case? In which situation would you encounter such a long word/string with no space? Not even in finnish or deutsch AFAIK. Also, what is a WB? – FelipeAls May 12 '12 at 13:42

1 Answers1

0

Try applying word-wrap: break-word; to your div, it works for me on Chrome.

In case you want a more cross-browser solution, you can try placing zero-width spaces &#8203; in the points where you want the breaks, like this answer suggests: https://stackoverflow.com/a/764015/1046057 (assuming you need a long string like the one you have with no spaces).

Community
  • 1
  • 1
DarkAjax
  • 15,955
  • 11
  • 53
  • 65
  • Got another problem now instead... The words that were breaked with the word-wrap: break-word; made the words get split into different parts. Can´t you make them stick togother? – Xweque May 11 '12 at 15:56
  • Ooops. Didn´t do spaces in preview for you... In real life it was a WB and nomatter if you used spaces or not, it continuted... – Xweque May 12 '12 at 18:46