This question has already been answered:

Is it possible to make it so that when the text reaches the edge of the block, it does not go beyond it, but is transferred to a new line?

<div class="post-text"></div> 
I set the text in JS. And a piece of CSS:

 "text": "kokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokokkokokokokokokkokokokokokokokokokokko 
 .post-text { display: inline-block; width: 600px; height: auto; margin-top: -30px; margin-left: 120px; margin-bottom: -60px; padding: 5px; font: bond 12px Arial; border: 1px solid #0960bb; } 

Reported as a duplicate by Qwertiy members, Community Spirit 6 Oct '16 at 13:53 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    1 answer 1

    In .post-text add word-wrap: break-word;

     .post-text { display: inline-block; width: 600px; height: auto; margin-top: -30px; margin-left: 120px; margin-bottom: -60px; padding: 5px; font: bond 12px Arial; border: 1px solid #0960bb; word-wrap: break-word; }