How to line break after long word
Hey guys, I have a comments section and if a user writes something like blablablablablabla or something really long, the word doesn't break, but goes on st开发者_开发问答raight, making the page look weird. How could I fix it and make it break the word?
this can be fixed with css
comment{
word-wrap:break-word;
}
Check it out here:
http://www.webdesignerwall.com/tutorials/word-wrap-force-text-to-wrap/
This can be solved with CSS. Have a look at word-wrap
:
.comment {
word-wrap: break-word;
}
will break overflowing words.
Please Note:
word-wrap: break-word;
not valid in W3C
精彩评论