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 6845135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:27:48+00:00 2026-05-27T00:27:48+00:00

I have a horizontal nav menu that I am working on. I have one

  • 0

I have a horizontal nav menu that I am working on. I have one issue left with this menu. When the user navigates to a page, I would like the main li to remain hovered. Right now, the li does not remain in a hovered state and simply reverts to default. Do I need to give the body a class to make this work or is there another way? The code snippet can be found here: http://jsfiddle.net/SeasonEnds/LSmfN/

Ideally, the Read tab should take on the hover styles upon on loading the page, but go away as the user hovers over the other main nav links.

  • 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-05-27T00:27:48+00:00Added an answer on May 27, 2026 at 12:27 am

    The highlight on the active element shouldn’t really disappear when the user hovers on another top-level link as this is bad for usability – if the user doesn’t click on a link then they’ve lost the visual clue as to where they are on your site.

    I’ve amended the css slightly:

    ul#topnav li.on a    {color:#828282; background: #f3f3f3; }
    ul#topnav li a:hover {background: #f3f3f3; color:#828282;}
    ul#topnav li a:visited {color:#828282; }
    

    I’ve also added a bit of jQuery to keep the colour of the active top-level link as you hover over the children:

    $("li a").hover(function(){
        $(this).parent().prev().toggleClass("top-level-highlight");
    });
    

    Updated fiddle:
    http://jsfiddle.net/LSmfN/14/

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

Sidebar

Related Questions

I have a ul list that I display as a horizontal menu. I'd like
I have this horizontal menu. The menu looks like tabs and are 29px high.
i have a that contains a HORIZONTAL menu. the menu consists of an unordered
I have a css horizontal menu with a menu / submenu display working on
My goals: I want to have #nav to be divide into menu-left and menu-right,
Say you have a horizontal, graphical nav menu where each menu item is variable
I'm doing this easy horizontal menu but I'm facing a funny issue... Dont know
I have a horizontal nav that looks as follows: I'm trying to remove the
I would like to have a menu list, used in a website navigation, where
I have a horizontal nav bar that is an unordered list with anchor tags.

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.