I have a simple UL navigation menu with width of 1000px:
<ul class="menu">
<li class="first"><a href="/">google</a></li>
<li><a href="/">google</a></li>
<li><a href="/">google</a></li>
</ul>
So, how can I set the first element to fit the entire UL width and push the other list items on the right (all LIs should be on the same line – horisontal menu)?
I know I could float:left the first and float:right the rest, but this will reverse the order of the right – floated elements.
I need a quick, CSS only solution, working even in IE6.
Thanks in advance!
UPDATE: To clarify, the first element is a logo, the final result is like the header of 9gag.com except the logo should be on the left and all links to the right.
Logo usually should not be a part of navigation menu. It’s more appropriate to mark-up it as header (
H1on home page, andH3on rest pages).You can use then
float: rightfor yourULlist itself to align menu to the right.