English 中文(简体)
Can I define which characters are allowed to break a word?
原标题:

I m showing up veeeery long URLs in my Safari extension. Obviously, they can t fit on a single line. Currently, word breaking rules make it so most URLs are on two lines: the first one is rather short and ends with the ? symbol, and the other is ridiculously long and contains all the rest of the GET parameters.

I d like to make it so words also break on the & symbol, without screwing up copy-paste if possible. I ve tried to replace every & with &u00ad (& + the soft hyphen character), but it s kind of weird to see the hyphen after the & when there really isn t any in the URL.

I thought there was something in store with CSS3 for that kind of problem, but I can t find it.

Any suggestion welcome, as long as it works with Safari.

最佳回答

Probably <wbr> is what you re looking for.

问题回答

<wbr> is a good answer, but you might also consider the zero-width space entity. I haven t used it much, but this article suggests using the following css to extend the cross-browser functionality:

wbr:after { content: "0200B" }




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签