my CSS
ul{ overflow:hidden; } li{ display:inline-block; }
my HTML
a b
Here is what you want. In this case you do not want the list items to be treated as blocks that can wrap.
li{display:inline} ul{overflow:hidden}