My goals:
I want to have #nav to be divide into menu-left and menu-right, and each has its max width
I want to make sure that #nav, menu-left and right are not statically fixed. So that it expands and shrinks according to settings of the users.
The output should be similar to what we see in the picture.
I am doing this in wordpress. I want to create an navigation or simply a horizontal menu at the very top.
What I want to do is to divide the original menu into two parts, as shown in the following picture.
http://i50.tinypic.com/zyaakl.jpg (The picture is quite big so I would leave it as a link)
A live demo is here http://www.i3physics.com/blog/?page_id=2
This is my css code
#nav {
background-color: #444444;
line-height: 35px;
margin: 0 auto;
overflow: hidden;
}
#nav ul {
float: right;
list-style: none;
margin: 0 0 0 0;
}
#nav ul#menu-left {
float: left;
max-width: 700px;
}
#nav ul#menu-right {
float: right;
max-width: 500px;
}
#nav ul li {
float: left;
text-align: center;
margin: 0;
padding: 0 12px 0;
}
#nav ul li a, #nav ul li a:visited {
float: left;
color: #ffffff;
font-size: 11px;
font-family: Verdana,sans-serif;
line-height: 35px;
font-weight: normal;
font-style: normal;
font-variant: normal;
text-transform: none;
text-decoration: none;
text-align: start;
text-indent: 0px;
}
#nav ul li a:hover {
color: #ffffff;
text-decoration: underline;
}
This is my sample code in header.php
<body>
<div id="nav">
<ul id="menu-left"><?php wp_list_pages('depth=1&title_li=0&sort_column=menu_order'); ?></ul>
<ul id="menu-right"><?php wp_list_pages('depth=1&title_li=0&sort_column=menu_order'); ?></ul>
</div>
What I want to do is to divide the original menu into two parts, as shown in the following picture.
http://i50.tinypic.com/zyaakl.jpg (The picture is quite big so I would leave it as a link)
So I thought about maximizing left and right. Then do margin-left and margining-right. But this is ugly. I want quality. It might ruin the display at a different resolution, and on a different monitor.
I even had tried this:
#nav ul#menu-left {
float: right;
max-width: 700px;
}
#nav ul#menu-right {
float: left;
max-width: 500px;
I will appreciate any help here. Thank you very much.