silverbob
07-25-2008, 07:02 PM
I've decided to use images for the top bar in this script. The images are stacked (or sliding images). I've gotten their hover states to work properly, but can't figure out how to maintain their "on" state while hovering over the sub items.
TopBar CSS:
.topbar ul{
margin: 0;
padding: 0;
list-style-type: none;
border-bottom: 0;
background: #fff;
overflow: hidden;
width: 100%;
}
.topbar li{
display: inline;
margin: 0;
}
.topbar li {float:left;}
.topbar li a {display:block; float:left; height:50px;}
.topbar li a b {position:absolute; left:-9999px;}
.topbar li a#products {width:162px; background:url(/images/topNav/products.gif);}
.topbar li a#downloads {width:162px; background:url(/images/topNav/downloads.gif);}
.topbar li a#support {width:163px; background:url(/images/topNav/support.gif);}
.topbar li a#compliance {width:163px; background:url(/images/topNav/compliance.gif);}
.topbar li a#partners {width:163px; background:url(/images/topNav/partners.gif);}
.topbar li a#company {width:167px; background:url(/images/topNav/company.gif);}
.topbar li a#products:hover,
.topbar li a#downloads:hover,
.topbar li a#support:hover,
.topbar li a#compliance:hover,
.topbar li a#partners:hover,
.topbar li a#company:hover
{background-position:left bottom; visibility:visible; position:relative; z-index:20;}
.topbar li:hover {position:relative; z-index:20;}
.topbar li:hover > a#products,
.topbar li:hover > a#downloads,
.topbar li:hover > a#support,
.topbar li:hover > a#compliance,
.topbar li:hover > a#partners,
.topbar li:hover > a#company
{background-position: left bottom;}
.topbar a.selected{
font-size: 16px;
font-family: sans-serif;
font-weight: normal;
color: #000;
background: #fff;
text-decoration: none;
}
Base CSS:
.ddsubmenustyle, .ddsubmenustyle ul{ /*topmost and sub ULs, respectively*/
font-weight: bold;
color: #7c7c7c;
font-family: arial, sans-serif;
font-size: 10px;
white-space: nowrap;
text-decoration: none;
/*font: normal 13px Verdana; */
margin: 0;
padding: 0 8px 0 8px;
position: absolute;
left: 0;
top: 0;
list-style-type: none;
background: white;
border: 1px #c9d2e3 solid;
visibility: hidden;
z-index: 100;
}
.ddsubmenustyle li a{
display: block;
width: 150px;
height:22px; line-height:22px;
color: #7c7c7c;
font-weight: bold;
background-color: #fff;
text-decoration: none;
padding: 4px 5px 4px 8px;
border-bottom: 1px solid #c9d2e3;
}
* html .ddsubmenustyle li a{ /*IE6 CSS hack*/
display: inline-block;
}
.ddsubmenustyle li a:hover{
background-color: #fff;
color: #000;
font-weight: bold;
text-decoration: none;
padding: 4px 5px 4px 8px;
border-bottom: 1px solid #c9d2e3;
height:22px; line-height:22px;
}
/* ######### Neutral CSS ######### */
.downarrowpointer{ /*CSS for "down" arrow image added to top menu items*/
visibility:hidden;
padding-left: 4px;
border: 0;
}
.rightarrowpointer{ /*CSS for "right" arrow image added to drop down menu items*/
position: absolute;
padding-top: 3px;
right: 6px;
border: 0;
}
.ddiframeshim{
position: absolute;
z-index: 500;
background: transparent;
border-width: 0;
width: 0;
height: 0;
display: block;
}
TopBar CSS:
.topbar ul{
margin: 0;
padding: 0;
list-style-type: none;
border-bottom: 0;
background: #fff;
overflow: hidden;
width: 100%;
}
.topbar li{
display: inline;
margin: 0;
}
.topbar li {float:left;}
.topbar li a {display:block; float:left; height:50px;}
.topbar li a b {position:absolute; left:-9999px;}
.topbar li a#products {width:162px; background:url(/images/topNav/products.gif);}
.topbar li a#downloads {width:162px; background:url(/images/topNav/downloads.gif);}
.topbar li a#support {width:163px; background:url(/images/topNav/support.gif);}
.topbar li a#compliance {width:163px; background:url(/images/topNav/compliance.gif);}
.topbar li a#partners {width:163px; background:url(/images/topNav/partners.gif);}
.topbar li a#company {width:167px; background:url(/images/topNav/company.gif);}
.topbar li a#products:hover,
.topbar li a#downloads:hover,
.topbar li a#support:hover,
.topbar li a#compliance:hover,
.topbar li a#partners:hover,
.topbar li a#company:hover
{background-position:left bottom; visibility:visible; position:relative; z-index:20;}
.topbar li:hover {position:relative; z-index:20;}
.topbar li:hover > a#products,
.topbar li:hover > a#downloads,
.topbar li:hover > a#support,
.topbar li:hover > a#compliance,
.topbar li:hover > a#partners,
.topbar li:hover > a#company
{background-position: left bottom;}
.topbar a.selected{
font-size: 16px;
font-family: sans-serif;
font-weight: normal;
color: #000;
background: #fff;
text-decoration: none;
}
Base CSS:
.ddsubmenustyle, .ddsubmenustyle ul{ /*topmost and sub ULs, respectively*/
font-weight: bold;
color: #7c7c7c;
font-family: arial, sans-serif;
font-size: 10px;
white-space: nowrap;
text-decoration: none;
/*font: normal 13px Verdana; */
margin: 0;
padding: 0 8px 0 8px;
position: absolute;
left: 0;
top: 0;
list-style-type: none;
background: white;
border: 1px #c9d2e3 solid;
visibility: hidden;
z-index: 100;
}
.ddsubmenustyle li a{
display: block;
width: 150px;
height:22px; line-height:22px;
color: #7c7c7c;
font-weight: bold;
background-color: #fff;
text-decoration: none;
padding: 4px 5px 4px 8px;
border-bottom: 1px solid #c9d2e3;
}
* html .ddsubmenustyle li a{ /*IE6 CSS hack*/
display: inline-block;
}
.ddsubmenustyle li a:hover{
background-color: #fff;
color: #000;
font-weight: bold;
text-decoration: none;
padding: 4px 5px 4px 8px;
border-bottom: 1px solid #c9d2e3;
height:22px; line-height:22px;
}
/* ######### Neutral CSS ######### */
.downarrowpointer{ /*CSS for "down" arrow image added to top menu items*/
visibility:hidden;
padding-left: 4px;
border: 0;
}
.rightarrowpointer{ /*CSS for "right" arrow image added to drop down menu items*/
position: absolute;
padding-top: 3px;
right: 6px;
border: 0;
}
.ddiframeshim{
position: absolute;
z-index: 500;
background: transparent;
border-width: 0;
width: 0;
height: 0;
display: block;
}