Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8643825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:08:49+00:00 2026-06-12T12:08:49+00:00

I want to create an effect, which is as follows: If I hover on

  • 0

I want to create an effect, which is as follows: If I hover on my dropdown menu, the hovered link is colored blue. Nice of course, but if I hover any list item in the dropdown menu, the blue link is going back to gray. How can I make the link stay blue, even if something else is hovered?

The link that has to be blue, is gray if I don’t hover it or something else. That is fine. If I hover it, it is blue. That is fine too, but if I go to a list item in the menu (so the gray link is the link to a dropdown menu), the link is going back to gray and not staying blue, when it was that color if hovered…

Code:

<div id="main-menu-wrap">
<ul id="menu-headmenu" class="menu-headmenu-container">
<li id="menu-item-429" class="menu-item menu-item-type-post_type menu-item-object-page">
<a href="blabla">
About us
<span class="sub"></span>
</a>
<ul class="sub-menu">
<li id="menu-item-435" class="menu-item menu-item-type-post_type menu-item-object-page">
<a href="blablbala">
Team
<span class="sub">blablabla</span>
</a>
</li>
<li id="menu-item-145" class="menu-item menu-item-type-taxonomy menu-item-object-category">
<a href="blablabla">
haha
<span class="sub">hahaa</span>
</a>
</li>
</ul>
</li>
<li id="menu-item-407" class="menu-item menu-item-type-post_type menu-item-object-page current-page-ancestor current-menu-ancestor current-menu-parent current-page-parent current_page_parent current_page_ancestor">

CSS:

#menu-headmenu li a:hover {
    background: none repeat scroll 0 0 #80806E;
    color: white;
}
#menu-headmenu li li a:hover {
    background: none repeat scroll 0 0 transparent;
}
#menu-headmenu li:hover .sub-menu {
    display: block;
}
#menu-headmenu .sub-menu li {
    background: none repeat scroll 0 0 white;
    float: none;
    font-size: 14px;
    margin-bottom: 1px;
    padding: 10px;
    text-transform: uppercase;
    width: 200px;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T12:08:51+00:00Added an answer on June 12, 2026 at 12:08 pm

    What you want to do can’t be done without JavaScript, as there simply is no such thing as an element:hoveredinpast pseudoselector. A quick jQuery example would be something like:

    $('#menu-headmenu .sub-menu li').hover({
        $(this).addClass('PermaBlue');
    });
    

    So long as you have a CSS class called PermaBlue with something like color: blue set, this will do what you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an effect, which is as follows: If I hover on
I want to create a custom WPF dropdown menu, so I created a User
I want to create an animation effects which sort of shakes an image on
I want to create a fading effect of text in Label control. I change
I want to create a horizontal swiping effect using jQuery Mobile. After doing a
I want create wordpress website into which I want create user management... That means
I want to create a model 'Relation' which extends ActiveRecord::Base, set it's table name
I have this php function, which I want to convert to javascript function, but
I am looking to create an effect like that which is used on The
I want to create a custom LinkBar in which the item which is selected

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.