开发者

word wrap long character string inside div tag

I have a DIV container I'm using as a comment box. I want to make sure that text doesn't overflow the DIV container, and instead 开发者_如何学JAVAwill wrap a long word. What's the easiest way to do this with CSS and PHP?


apply the below class to div

.break-word {
  word-wrap: break-word;
}


define white-space:normal; as css property to div to fit text in box and to break word is word-wrap:break-word;

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜