Reputation: 12486
<div id="id_div_comments"><p>body4qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq</p></div><br/><br/>
</div>
The css file:
div#id_div_comments {
width: 400px;
}
But the string/texts exceeds the division width. What can i do to break the texts when it reaches the width of the division ?
Upvotes: 7
Views: 21312
Reputation: 43
Old question but no correct answer, for long text this should work
#id_div_comments p{
word-break: break-all;
}
Upvotes: 3
Reputation: 25280
After seaching around, the following css actually works
#id_div_comments p{
overflow: hidden;
}
Just trust me
Upvotes: 4
Reputation: 92863
wirte this in your css word-wrap:break-word;
css:
#id_div_comments p{
word-wrap:break-word;
}
Upvotes: 34