make <ul> fit width of <li> links

Viewed 21277

I have a div with overflow-x:scroll; and in that div I have a list, and that list have some links. But I don't seem to be able to make my list a wide as its links. Which results in my links jumping lines.

How would I fix this?

My html

<div class="menu">
    <ul>
        <li>
            <a href="#">a long text that jumps lines</a>
        </li>
        <li>
            <a href="#">a line that don't jump</a>
        </li>
    </ul>
</div>

My CSS

.menu{
   width:400px;
   overflow-x:scroll;
}
1 Answers
Related