2 replies [Last post]
Barney0o0
Offline
newbie
Last seen: 15 years 4 weeks ago
Joined: 2004-10-22
Posts: 5
Points: 0

Sorry, could someone help with this one.....i can workout all the over/on/active states of the main buttons etc, however i dont know how to extend the code to give an active state on the sub menus. In the html for the main menus i have for example:

<li id="active"><a href="/ver2/boroughs/hubs.htm">Creative Hubs </a></li>
<li><a href="/ver2/boroughs/members.htm">Borough Members </a></li>

The css is below...how and what do i need to right to include a active state for the sub menue (the ul ul bit)?

Many thanks

#navcontainer ul
{
margin: 0;
padding: 0;
list-style-type: none;
}

#navcontainer li { margin: 0 0 .2em 0; }
#navcontainer a
{
display: block;
color: #333333;
background-color: #D4C7A0;
width: 12em;
padding: .2em .8em;
text-decoration: none;
font-family: "Lucida Sans", "Lucida Sans Unicode";
font-size: 11px;
text-align: left;
}

#navcontainer a:hover
{
background-color: #878686;
color: #FFF;
}
#navcontainer ul ul li { margin: 0 0 .2em 0; }

#navcontainer ul ul a
{
display: block;
width: 12em;
padding: .2em .8em;
color: #fff;
background-color: #A88F52;
text-decoration: none;
font-family: "Lucida Sans", "Lucida Sans Unicode";
font-size: 11px;
text-indent: 0.8em;
}

#navcontainer ul ul a:hover
{
color: #fff;
background-color: #666666;
text-decoration: none;
}

#active a
{
display: block;
color: #FFF;
background-color: #878686;
width: 12em;
padding: .2em .8em;
text-decoration: none;
}

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 1 year 13 weeks ago
Timezone: GMT+1
Joined: 2004-06-30
Posts: 9668
Points: 801

'active' - Sub menus

Try something like

#navcontainer ul ul li#active a
{

}

Verschwindende wrote:
  • CSS doesn't make pies

Barney0o0
Offline
newbie
Last seen: 15 years 4 weeks ago
Joined: 2004-10-22
Posts: 5
Points: 0

'active' - Sub menus

cheers...i'd tried so many conbinations i was loosing the plot a little...it works a treat

Many thanks