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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:29:23+00:00 2026-06-13T04:29:23+00:00

My problem is probably quite simple, but somehow I can’t get it fixed. In

  • 0

My problem is probably quite simple, but somehow I can’t get it fixed. In a group of objects with one object hovered over, I’d like the hovered object to remain unchanged, but all others are supposed to change.

To be more specific: I have an unordered list of menu-items. Whenever I hover over one of them, all the other items are supposed to become smaller. When I “unhover” the item they should change back again.

I found this post, but it’s answers didn’t work for me:
Set style for not not hovered elements only

This is what I tried so far:

/*This is the default size*/
#navigation ul li a
{
    font-size: 14px;    
}
/*When the list is hovered, change font-size (does’nt work)*/
#navigation ul:hover
{
    font-size: 13px;    
}
/*When the a menu-item is hovered change it’s font-size back to default*/
#navigation ul li a:hover
{
    font-size: 14px;    
}

This is one of the answers I found in the post I mentioned. It would be great if it could be done that simply with plain CSS. But it’s not working. Did I do something wrong?

I also tried something with jQuery, although I’m not an expert.

for(var i=1; i <= anzahlNavipunkte; i++)
{
    var naviId = "navi" + i; // id name for every menu-item
    var currentMenuItem = "#navigation li:nth-child(" + i + ") a"; 

    $(currentMenuItem).attr('id', naviId); // gives the current menu-item a specific id

    $('#navigation li a').hover(function()
    {   
        var hoveredId = $(this).attr("id"); // get the id of of the hovered element

        $('#' + hoveredId).hover(function()
        {   
            console.log(hoveredId);
            $('#' + hoveredId).css('font-size', '14px'); // hovered element gets default font-size
            $('#navigation ul').css('font-size', '13px'); // other elements change to 13px
        }, function()
        {
            $('#navigation ul').css('font-size', '14px'); // other elements change back
        })
    });
};  

It doesn’t work, either. Probably because it’s the same approach as with the plain CSS-solution. Can anybody help me out?

I hope my explanation is understandable. If there are questions left please ask.

  • 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-13T04:29:24+00:00Added an answer on June 13, 2026 at 4:29 am

    HTML:

    <div id="container" >
       <div id="children">
       </div>
    </div>
    

    CSS:

    #container:HOVER #children {
        /* your style */
    }
    

    Try this…

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

Sidebar

Related Questions

The solution to my problem is probably quite simple, but I can't find it.
This is probably quite simple but I've googled and can't find an answer. I
I have a pretty simple general programming problem, yet I can't quite get the
This is probably quite a simple problem, but it's causing me to scratch my
This is probably something extremely simple but I can't get my head around it
This is probably quite a simple problem, but Im quite new to R. I
The problem is probably quite simple. $q = SELECT id FROM users WHERE name
I've got a problem which is probably very easy to solve but I can't
This is probably quite simple but I haven't yet been able to wrap my
I have a probably quite simple to solve problem. I'm trying to parse this

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.