I have a ul
list that I display as a horizontal menu. I'd like the content of each li
to remain on one line, but the entire li
items to jump lines as necessary. Something like:
First entry in the menu
Second menu entry
These words are short, the LI jumps lines, but doesn't wrap
Yet anoter]
[And more]
[Some more]
Logically, I'd just put li {white-space:nowrap;}
, but there is a problem with WebKit browsers. Items with nowrap get stuck to adjacent items. So in the case above, all the li
will be on the same line.
The same goes for an isolated element with nowrap
inside a wrapping text block.
<p>Visit my sites <a href="http://gabrielradic.com/" style="white-space:nowrap">Gabriel Radic
.com (English)</a> or <a href="http://www.timbru.com/" style="white-space:nowrap">Timbru Blog
(Romanian)</a>.
What I would expect is something like:
Visit my sites Gabriel Radic .com or
Timbru Blog
Instead, the two links end up stuck together, like:
Visit my sites
Gabriel Radic .com or Timbru Blog (Romanian)
Is there a nice way to tell Safari, Chrome and others to stop grabbing people's elbows?
Thanks for you help.