mstyers
03-07-2009, 08:59 PM
1) DD Tab Menu / Example #3
2) http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
3) I am trying to center the DD Tab menu. I can get it centered by removing the float: left and adding the correct padding but then the hover will not work correctly. I am getting a gap between the menu items.
Can someone help?
Thanks.
CSS
.solidblockmenu ul{
margin: 0;
padding: 9px 0;
float: left;
font: bold 13px Arial;
width: 100%;
border: 1px solid #625e00;
border-width: 1px 0;
background: black url(images/blockdefault.jpg) center center repeat-x;
}
.solidblockmenu li{
display: inline;
}
.solidblockmenu li a{
/*float: left;*/
color: white;
padding: 9px 11px;
text-decoration: none;
border-right: 1px solid white;
}
.solidblockmenu li a:visited{
color: white;
}
.solidblockmenu li a:hover, .solidblockmenu li a.current{
color: white;
background: transparent url(images/blockactive.jpg) center center repeat-x;
}
HTML
<div id="ddtabs3" class="solidblockmenu">
<ul>
<li><a href="index.html" class="current">Home</a></li>
<li><a href="firstpage.html">First Page</a></li>
<li><a href="secondpage.html">Second Page</a></li>
<li><a href="thirdpage.html">Third Page</a></li>
</ul>
</div>
2) http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm
3) I am trying to center the DD Tab menu. I can get it centered by removing the float: left and adding the correct padding but then the hover will not work correctly. I am getting a gap between the menu items.
Can someone help?
Thanks.
CSS
.solidblockmenu ul{
margin: 0;
padding: 9px 0;
float: left;
font: bold 13px Arial;
width: 100%;
border: 1px solid #625e00;
border-width: 1px 0;
background: black url(images/blockdefault.jpg) center center repeat-x;
}
.solidblockmenu li{
display: inline;
}
.solidblockmenu li a{
/*float: left;*/
color: white;
padding: 9px 11px;
text-decoration: none;
border-right: 1px solid white;
}
.solidblockmenu li a:visited{
color: white;
}
.solidblockmenu li a:hover, .solidblockmenu li a.current{
color: white;
background: transparent url(images/blockactive.jpg) center center repeat-x;
}
HTML
<div id="ddtabs3" class="solidblockmenu">
<ul>
<li><a href="index.html" class="current">Home</a></li>
<li><a href="firstpage.html">First Page</a></li>
<li><a href="secondpage.html">Second Page</a></li>
<li><a href="thirdpage.html">Third Page</a></li>
</ul>
</div>