I've searched through everything and can't seem to find an exact fix for this. It seems pretty simple but I've been beating my head against a wall lately trying to get it just right.
I have a simple horizontal menu on a website. I am using an UL to make it all work. Here is my code:
> <div id="nav">
> <ul>
> <li><a href="#">Home</a></li>
> <li><a href="#">company</a></li>
> <li><a href="#">Products</a></li>
> <li><a href="#">Services</a></li>
> <li><a href="#">Involvement</a></li>
> <li><a href="#">Blog</a></li>
> <li class="right"><a href="#">Contact Us</a></li>
> </ul>
> </div> <!-- End Nav -->
My Css is as follows:
#nav ul{
width:980px;
margin:0;
padding:0;
border:1px solid red;
}
#nav ul li{ float:left;color:#FFF}
#nav ul li a {display:block;padding:5px 62px 0 0px; text-decoration:none; color:#FFF}
#nav ul li.right{float:right;margin-right: -30px;
}
The Problem I am having is that the last item will align right but now there is a huge space between the second to last tab and the last tab. This is because of the padding left I have in the li a portion. I just want the first text to align left and the last text to align right and the others in between to have consistent space. You can see the issue here:http://jsfiddle.net/nathan1342/sPZG9/
Any help would be very much appreciated!!
Thanks!