How can I make text appear on next line instead of overflowing? [duplicate]

别来无恙 提交于 2019-11-28 17:41:54
mikemerce
word-wrap: break-word

But it's CSS3 - http://www.css3.com/css-word-wrap/.

Pankaj Verma

Just add

white-space: initial;

to the text, a line text will come automatically in the next line.

Try the <wbr> tag - not as elegant as the word-wrap property that others suggested, but it's a working solution until all major browsers (read IE) implement CSS3.

Well, you can stick one or more "soft hyphens" (&#173;) in your long unbroken strings. I doubt that old IE versions deal with that correctly, but what it's supposed to do is tell the browser about allowable word breaks that it can use if it has to.

Now, how exactly would you pick where to stuff those characters? That depends on the actual string and what it means, I guess.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!