What you need is word-wrap: break-word;, this property will force the non spaced string to break inside the div
Demo
div {
width: 20px;
word-wrap: break-word;
}
What you need is word-wrap: break-word;, this property will force the non spaced string to break inside the div
Demo
div {
width: 20px;
word-wrap: break-word;
}