Hy, I've tried everything and nothing works.
I have this fiddle: http://jsfiddle.net/kauqdk9j/
<div id="test" contenteditable="true"></div>
#test { width:400px; height:30px; font-size:13px; border:1px solid #333; word-wrap:break-word; word-break: break-all;white-space: nowrap}
I've tried in CSS: word-wrap:break-word; word-break: break-all;white-space: nowrap, and nothing happens. Can someone help me with this issue please?
You can wrap a long string, which does not have any whitespace character by using the CSS word-wrap property, or overflow-wrap, if you use CSS3. In this snippet, you'll find some examples for block elements, as well as for the inline ones.
#test {
width:400px;
height:30px;
font-size:13px;
border:1px solid #333;
word-wrap: break-word;
overflow-wrap: break-word;
white-space: normal;
}
#test {
width:400px;
height:30px;
font-size:13px;
border:1px solid #333;
word-wrap: normal;
overflow-wrap: normal;
white-space: nowrap;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With