开发者

my Div doesn't break lines automatically when writing one big word

I'm using a YUI rich text editor in my project. it works fine for me, but I'm facing an issue. It doesn't bre开发者_运维百科ak lines automatically when writing one big word as shown in the image.

my Div doesn't break lines automatically when writing one big word


You can use the CSS 3 property word-wrap:

div {
    word-wrap: break-word;
}

Supported by IE 5.5+, Firefox 3.5+, Chrome 1.0+, Opera 10.5+, Safari 1.0+.

Alternatively, you can wrap everything in a <wbr> tag, although it's not supported by Opera.


@ali; just write

div{
word-wrap:break-word;
}

word-wrap force the text to wrap.

check this for more http://webdesignerwall.com/tutorials/word-wrap-force-text-to-wrap

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜