开发者

Word wrapping in a span in IE8

I am attempting to get word wrapping to work in a span. Currently I am using "word-wrap:break-word;" which works in mo开发者_JAVA技巧st browsers, however there is a requirement for word wrapping to work in IE8.

Are there any other methods of doing this which will support more browsers?


It appears that word-wrap: break-word is broken in IE when using on an inline element, even if its enclosing block defines a width. Finally figured out that it works on blocks. If you want to make it work on a span you must set the display property to inline-block or replace the span with a div or a p.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜