PDA

View Full Version : DD top menu



jambled
07-27-2005, 07:27 AM
Does anyone know the coding to get a menu like the one used on the dynamic drive homepage? The green, that darkens when it's hovered over. Please help, it's been frustrating me for the better part of a few hours now.

ddadmin
07-27-2005, 07:48 AM
This is a CSS based tabs interface. Unfortunately it's not openly available for download, and the tab images used are copyright Dynamic Drive. However, you can study the CSS file to see how it's done in general:



#ddtoptabs{
margin-left: 4px; /*Opera 8 fix -1px*/
padding: 0;
width: 450px;
height: 27px;
background: transparent;
voice-family: "\"}\"";
voice-family: inherit;
padding-left: 5px;
}

#ddtoptabs ul{
font: normal 10px verdana, arial, sans-serif;
margin:0;
padding:0;
list-style:none;
}

#ddtoptabs li{
display:inline;
margin:0 2px 0 0;
padding:0;
text-transform:uppercase;
line-height: 1.3em;
font-size: 120%;
}


#ddtoptabs a, #ddtoptabs strong{
float:left;
color:#fff;
background: transparent url("tabs_left.gif") no-repeat left top;
margin:0 2px 0 0;
padding:0 0 0 3px;
text-decoration:none;
font-size: 10px;
letter-spacing: 1px;
margin-top: 4px;
font-family: Arial, Verdana, sans-serif;
border-bottom: 1px solid #FFF;
}

#ddtoptabs a span, #ddtoptabs #current span{
float:left;
display:block;
color:#fff;
background: transparent url("tabs_right.gif") no-repeat right top;
padding:3px 9px 3px 6px;
font-weight:bold;
}

#ddtoptabs a span{
float:none;
}

#ddtoptabs #current a, #ddtoptabs strong{
background-position:0 -300px;
border-bottom: 1px solid #2B6600;
}

#ddtoptabs #current a span, #ddtoptabs #current span{
background-position:100% -300px;
padding-bottom:3px; color:#fff;
}

#ddtoptabs a:hover{
background-position:0% -150px;
}

#ddtoptabs a:hover span{
color: #fff;
background-position:100% -150px;
}

#ddtoptabs #current a:hover { background-position:0% -300px; }
#ddtoptabs #current a:hover span { color: #fff; background-position:100% -300px; }

#ddtoptabsline{
clear: both;
padding: 0;
width: 100%;
height: 8px;
background: #2B6600;
border-bottom: 1px solid #fff;
margin-bottom: 5px;
}