wordwrap a very long string

This question has been asked here before: Who has solved the long-word-breaks-my-div problem? (hint: not stackoverflow) word wrap in css / js CSS: how can I force a long string (without any blank) to be wrapped in XUL and/or HTML CSS overflow with long URL Long story short: As far as CSS solutions go you … Read more

Is there a way to word-wrap long words in a div?

Reading the original comment, rutherford is looking for a cross-browser way to wrap unbroken text (inferred by his use of word-wrap for IE, designed to break unbroken strings). /* Source: http://snipplr.com/view/10979/css-cross-browser-word-wrap */ .wordwrap { white-space: pre-wrap; /* CSS3 */ white-space: -moz-pre-wrap; /* Firefox */ white-space: -pre-wrap; /* Opera <7 */ white-space: -o-pre-wrap; /* Opera 7 … Read more

Auto line-wrapping in SVG text

Text wrapping is not part of SVG1.1, the currently implemented spec. In case you are going to use your SVG graphic on the Web, you can embed HTML inside SVG via the <foreignObject/> element. Example: <svg …> <switch> <foreignObject x=”20″ y=”90″ width=”150″ height=”200″> <p xmlns=”http://www.w3.org/1999/xhtml”>Text goes here</p> </foreignObject> <text x=”20″ y=”20″>Your SVG viewer cannot display … Read more

What is the difference between “word-break: break-all” versus “word-wrap: break-word” in CSS

word-wrap: break-word recently changed to overflow-wrap: break-word will wrap long words onto the next line. adjusts different words so that they do not break in the middle. word-break: break-all irrespective of whether it’s a continuous word or many words, breaks them up at the edge of the width limit. (i.e. even within the characters of … Read more