jpw1984
04-12-2011, 06:47 PM
I have a nav bar that I am struggling to get positioned correctly. The UL is perfectly centered in teh navigation div, but I can't get the links to be centrally alligned without screwing up the design of it. It's a simple nav bar, but I have coded and created the links to have an onstate and hover arrow at the bottom of them.
Anyone can help that be great.
<div id="sec_nav"><!-- Begin Sec Nav-->
<ul>
<li><a href="/index" class="sec_navselect">About</a></li>
<li><a href="/portfolio" >Portfolio</a></li>
<li><a href="/prints" >Print Sales</a></li>
<li><a href="/stock" >Stock Sales</a></li>
</ul>
</div><!-- End Sec Nav-->
#sec_nav {width: 100%; background:yellow; height: 34px; background-image:url(../images/secnav_bg.jpg); background-repeat:repeat-x;}
#sec_nav ul { margin: 0 auto; list-style: none; height: 34px; width: 500px}
#sec_nav li {float: left; padding-right: 20px;}
#sec_nav a {height: 33px; color:#999999; display: block; width: auto;text-decoration: none; font-size: 10px; font-family:Verdana, Arial, Helvetica, sans-serif; width: 100%}
#sec_nav a:hover, #sec_nav a.sec_navselect {color: #333333; background-color: transparent; background-image: url("../images/secnav_arrow.jpg"); background-repeat: no-repeat;background-position: center bottom; text-decoration:none}
Anyone can help that be great.
<div id="sec_nav"><!-- Begin Sec Nav-->
<ul>
<li><a href="/index" class="sec_navselect">About</a></li>
<li><a href="/portfolio" >Portfolio</a></li>
<li><a href="/prints" >Print Sales</a></li>
<li><a href="/stock" >Stock Sales</a></li>
</ul>
</div><!-- End Sec Nav-->
#sec_nav {width: 100%; background:yellow; height: 34px; background-image:url(../images/secnav_bg.jpg); background-repeat:repeat-x;}
#sec_nav ul { margin: 0 auto; list-style: none; height: 34px; width: 500px}
#sec_nav li {float: left; padding-right: 20px;}
#sec_nav a {height: 33px; color:#999999; display: block; width: auto;text-decoration: none; font-size: 10px; font-family:Verdana, Arial, Helvetica, sans-serif; width: 100%}
#sec_nav a:hover, #sec_nav a.sec_navselect {color: #333333; background-color: transparent; background-image: url("../images/secnav_arrow.jpg"); background-repeat: no-repeat;background-position: center bottom; text-decoration:none}