So I have a comment social thing I created. Basically what happens is that if someone types a really long word, I mean like no spaces whatsoever, the new div created won't be able to contain it, so it runs off the page.
Here is a live example:
.content {
background-color: white;
margin: 0 auto;
width: 500px;
border: 1px solid purple;
padding: 10px;
}
<div class="content" style="color:#B404AE; font-weight:bold;">'.$name. '</div>
<div class="content">'VerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongwordVerylongword'</div>
<br
/>
JSbin version: http://output.jsbin.com/tilomacopo
How do I avoid this problem. Is there a way to split this word up, if there is no spaces in it? I'm not sure what I should google, or even how to word this, which is the main problem. Thank you for your replies.