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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:03:15+00:00 2026-06-08T03:03:15+00:00

I am creating a CSS hover drop-down menu. I have a search icon that

  • 0

I am creating a CSS hover drop-down menu. I have a search icon that has a hover on it also. When you hover over the icon it drops down an input for a search. However when the mouse moves off the area the search box disappears. Looking to keep the box there as long as the cursor is inside the input field, or the input is focused.

If you need me to post what I have just let me know, but it’s basically just this with a standard pure CSS hover drop-down, this is the basic HTML setup:

<li class="search">
    <ul class="search">
        <li><input placeholder="enter search" action=""></li>

So it works but as I stated when you move off, even with the cursor flashing it will hide again. I’m assuming I’ll need some sort of JavaScript to make this work, but not sure where to start with that.

  • 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-08T03:03:16+00:00Added an answer on June 8, 2026 at 3:03 am

    You could just add and remove a class to the li using JavaScript. The code below is in jQuery though.

            $( ".search" ).onmouseenter( function() {
                $( "input" ).addClass( "seeMe" ).focus();
            });
    
            $( "input" ).blur( function() {
                $( this ).removeClass( "seeMe" );
            });
    

    This makes the input visible and gives it focus when you hover the search li and hides when the input loses focus.

    See a modified version of this on my jsFiddle.

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

Sidebar

Related Questions

I'm creating a CSS drop down menu which is going well so far, however
I am creating a simple drop down menu using css. <ul> <li id=base><a href=projects.php
Stack, I'm having difficulty creating a good drop down navigation menu using only css.
I'm creating a drag and drop image environment, where if you hover over an
I have a design I'm creating in CSS, and it has started to sort
I am creating a dropdown that slides down when hovered over. This is some
I am creating a design with a drop-down menu and everything works well in
I'm creating a prototype of a CSS/XHTML tables-based calendar that eventually will be generated
Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
I have problems with CSS. The table is creating white border and I do

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.