开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜