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;
精彩评论