I have a ul that may contain list items that are wider than the space that I want to allow for them. I want list items that are too long to just run off the end and be hidden instead of wrapping. If I make the li width 200px and the ul width 125px with overflow: hidden ... it doesn't work.

Any suggestions?

1 answer


you also need white-space: nowrap; on the li

Answered almost 10 years ago by Tony Crockford