Keeping li's in a horizontal list together

S

Spartanicus

Nik Coughin said:
I have three logos in a ul, which is styled as a horizontal list.

http://www.crew.org.nz/index.php
http://www.crew.org.nz/crew.css

The ul has the id "sponsor" and is at the bottom of the page.

When the page size gets too small, the li's start wrapping to the next line
because they hit the news div. I would prefer them to stay together and end
up under the news div.

How would I achieve this?

<ul id="sponsor" style="white-space:nowrap"> (doesn't work in IE)
li{display:table-cell} (doesn't work in IE)

Btw, you may want to get rid of the horizontal scrollbar in Opera.
 
J

Jeff Thies

Spartanicus said:
<ul id="sponsor" style="white-space:nowrap"> (doesn't work in IE)

That's pretty cool!

In the meantime the OP can consider the never officially sanctioned but
widely supported <nobr>Can't break this</nobr>

or replace spaces with &nbsp; Can't&nbsp;break&nbsp;this
That can still break on some characters in some browsers.

Yucca Korpella has much to say about that on his site.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top