How do I center some items and left align others in css menu?
I have a menu based on this:
<style> /* These styles create the dropdown menus. */ #navbar { margin: 0; padding: 0; float:none; height: 1em; } #navbar li { list-style: none; width:170px; float: left; } #navbar li a { display: block; padding: 3px 8px; background-color: #808080; text-align: center; color: #fff; text-decoration: none; } #navbar li ul { display: none; width: 171px; /* Width to help Opera out */ background-color: #808080;} #navbar li:hover ul, #navbar li.hover ul { display: block; position: absolute; margin: 0; padding: 0; } #navbar li:hover li, #navbar li.hover li { float: none; } #navbar li:hover li a, #navbar li.hover li a { background-color: #808080; color: #fff; } #navbar li a:hover { background-color: #C0C0C0; } #navbar li li a:hover { background-color: #C0C0C0; } .auto-style2 { font-family: Verdana; font-size: 9pt; } .auto-style3 { color: #666666; } </style> <script> // Javascript originally by Patrick Griffiths and Dan Webb. // Son of Suckerfish Dropdowns | HTML Dog sfHover = function() { var sfEls = document.getElementById("navbar").getElementsByTag Name("li"); for (var i=0; i<sfEls.length; i++) { sfEls[i].onmouseover=function() { this.className+=" hover"; } sfEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(" hover\\b"), ""); } } } if (window.attachEvent) window.attachEvent("onload", sfHover); </script> |
Is that doable? If so, how?
thanks.
Best regards,
Thomas
The 2nd Amendment, 1789 - The Original Homeland Security.
Gun control means never having to say, "I missed you."