with [ and ])... And also this-is-a-very-big-word." />
开发者

Long words breaking layout. What about with HTML input in UTF-8?

开发者 https://www.devze.com 2022-12-12 10:11 出处:网络
Imagine if I have in a text something like [a href=\"this-is-a-very-big-link\"开发者_如何学运维]this is ok[/a] (switch < and > with [ and ])... And also this-is-a-very-big-word.

Imagine if I have in a text something like [a href="this-is-a-very-big-link"开发者_如何学运维]this is ok[/a] (switch < and > with [ and ])... And also this-is-a-very-big-word.

I need to cut the second case in two lines...

Notice wordwrap kills the link so it is not useful for solving this sort of problem.

Any idea?


In CSS:

word-wrap: break-word;


Decided to use the breakLongWords() function found on the www.php.net/wordwrap

I know using word-wrap: break-word; would be better, but as I tried right now I saw that Firefox doesn't implement it yet, so I guess I'll have to keep it on the server-side...

0

精彩评论

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

关注公众号