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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:12:03+00:00 2026-06-07T15:12:03+00:00

Has anyone else noticed that when you have the CSS:hover effect applied to an

  • 0

Has anyone else noticed that when you have the CSS:hover effect applied to an element, hide that element and keep the mouse perfectly still, the hover effect is still present until the mouse moves?

I’ve has a search but can’t seem to find any other threads similar. I know it is probably easy but I cannot find the solution and it will cause me to end up in Bedlam.

To see what I mean, take a look at this Fiddle: http://jsfiddle.net/NsMKN/ and

  1. Click the black box to expand it
  2. move the cursor outside the original blackness like where the red X is
  3. click to hide and keep the mouse cursor PERFECTLY still
  4. notice the black box is still red???

When the cursor moves, the :hover is not applied as it should, but it there a way to do this without having to move the mouse and without having to apply the hover effect using jQuery myself (leaving it to CSS)?

Update: I’ve marked Starx as the answer as it does appear to be an IE thing. Thanks for the help guys.

awesome piccy

  • 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-07T15:12:06+00:00Added an answer on June 7, 2026 at 3:12 pm

    Let me split your code.

    <div class="tester">
        <div class="content">
            apple, banana, carrot, lettuce, celery, beetroot
        </div>
    </div>
    

    Here, the div .content is inside .tester which wraps itself with respect to the what is inside, on general cases.

    .tester:hover
    {
       background-color:red; 
    }
    

    Your CSS is also applied to the same wrapper div i.e. .tester. So, that when the mouse is over to this part, its background color will change.

    $('.tester').click(function () {
        $(this).children('.content').toggle();
    });
    

    Now, when you toggle the inner element to make it visible. The dimensions of the .tester will change according to the inner elements. Although it is fixed in your case, DOM also has to consider its children. Try to do the same with this fiddle.

    Example Showing the Issue

    Due to this reason The the mouse will still be over the div .tester. So, style of .tester:hover will still be applied.

    Now, when you the toggle .content, the wrapper div .tester will retain the previous state, until further event occurs.

    Browsers like IE, does not seem to update its DOM properties until next event occurs.

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

Sidebar

Related Questions

I just want to see if anyone else has noticed that when loading images
I don't know if anyone ELSE has noticed this, but I noticed the jQuery
I don't know if anyone else even has this problem, or has noticed, but
has anyone else experienced this . I have SP1 but i have to kill
Has anyone else experienced this? I have uninstalled and reinstalled TortoiseSVN as well as
Ok I have looked into this, and I'm not sure if anyone else has
I have noticed that after my Grails app has been deployed for about 2
Has anyone else come across this at all? I used to be able to
Has anyone else had this issue and found a working solution? I've enabled the
Just wondering if anyone else has spotted this: On some user's machines running our

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.