/    Sign up×
Community /Pin to ProfileBookmark

edit styles on 2nd level csshover.htc menu

I would like the ‘background’ colour to be different on 2nd and all other levels of my csshover.htc menu – I want the top level ‘default’ menu to have a white background, but I would like the pop-outs to have a coloured background when they appear (ie, not just on mouseover)

Here is the css I’m using to style the menu:

[CODE]
#lhmenu {
width: 12em;
}
#lhmenu ul {
list-style: none;
margin: 0;
padding: 0;
}
#lhmenu a, #lhmenu h2 {
display: block;
margin: 0;
font-family: Geneva, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: normal;
line-height: 20px;
}
#lhmenu h2 {
font-size: 12px;
font-weight: normal;
color: #333333;
}
#lhmenu a {
text-decoration: none;
background-color: #FFFFFF;
margin: 0px;
padding-top: 2px;
padding-right: 2px;
padding-bottom: 4px;
padding-left: 4px;
}
#lhmenu a:hover {
color: #FFFFFF!important ;
background-color: #666666;
}
#lhmenu ul ul ul {
position: absolute;
top: 0;
left: 0;
}
#lhmenu li {
position: relative;
background-color: #FFFFFF;
width: 12em;
}
#lhmenu ul ul ul {
position: absolute;
top: 0;
left: 100%;
width: 100%;
}
div#lhmenu ul ul ul
{display: none;}
div#lhmenu ul ul li:hover ul
{
display: block;
background-color: #FF0000;
}
div#lhmenu ul ul ul,
div#lhmenu ul ul li:hover ul ul
{display: none;}
div#lhmenu ul ul li:hover ul
{display: block;}
div#lhmenu ul ul ul,
div#lhmenu ul ul li:hover ul ul
{display: none;}
div#lhmenu ul ul li:hover ul,
div#lhmenu ul ul ul li:hover ul
{display: block;}
[/CODE]

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@slaughtersSep 28.2010 — Impossible to tell without the html

BUT - if I was to guess I would be something like this

#lhmenu ul li {

background-color: #FFFFFF;

}

#lhmenu ul ul li {

background-color: #00FF00;

}
×

Success!

Help @LouPhi spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...