How to change hover color is background of selected item?
How to change hover color is background of selected menu item after click.
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manas MohapatraRank #182 · 13.2K reputationPosted Apr 6, 2016, 10:46 PM EDT
RajaRank #1,035 · 1.9K reputationPosted Apr 7, 2016, 1:12 AM EDT
{
list-style:none;
}
.top-nav ul li a {
display:block;
outline: none;
color: black;
text-decoration: none;
font-size: 1.3em;
padding: 1em;
text-align: right;
background: #333b3e;
}
.top-nav ul li a.black{
background: white;
}
.top-nav ul li a.black1
{
background: white;
}
.top-nav ul li a.black2
{
background:white;
}
.top-nav ul li a.black3
{
background:white;
}
.top-nav ul li a.black4
{
background:white;
}
.top-nav ul li a.black5
{
background:white;
}
.top-nav ul li a:hover,.top-nav ul li.active a {
width: 91%;
padding-left: 0px;
background: gray;
}
.top-nav ul li.active a
{
width: 91%;
padding-left: 0px;
background: #23aeac;
}