문제

I've created this menu with css. But it wraps if the width of the window is smaller than then entire menu.

How do you stop it from wrapping to the next line?

see code. http://jsfiddle.net/49RCL/1/

<nav>    
    <ul class="siteNav">    
         <li><a href="http://cnn.com"><img src="http://s7.postimg.org/m54vbq4kn/logo.png" width="166" height="60"</a></li>    
        <li><a href="http://cnn.com">Menu 1</a></li>    
        <li><a href="http://cnn.com">Menu 2</a></li>    
        <li><a href="http://cnn.com">Menu 3</a></li>    
        <li><a href="http://cnn.com">Menu 4</a></li>    
        <li><a href="http://cnn.com">Menu 5</a></li>    
        <li><a href="http://cnn.com"><form action=""><input type="color" name="favcolor" size="26" placeholder="Search"></form></a></li>    
    </ul>    
</nav>
도움이 되었습니까?

해결책

add

white-space: nowrap;

to your .siteNav

http://jsfiddle.net/URL4g/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top