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

  • Home
  • SEARCH
  • 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 7751745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T11:37:35+00:00 2026-06-01T11:37:35+00:00

Just writing some CSS and I have a pretty cool Search form where you

  • 0

Just writing some CSS and I have a pretty cool Search form where you click on the search icon and it expands out using, “transition: width 0.5 ease-in-out” in CSS.
Great. That works fine.

However, I am planning to put my navigation bar next to the search div on the right of it but of course it will overlap when the user clicks the Search button.
I was wondering if anyone knew of a way where when the Search is expanded, the navigation Div automatically moves to the right with it. I also want the div to revert back to normal when the form loses focus (as the search bar goes back in with the “ease-in-out” function).

I think there maybe some JQuery out there that does it but I really don’t know how to write it if there is?

  • 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-01T11:37:36+00:00Added an answer on June 1, 2026 at 11:37 am

    There is indeed a jQuery method that can help you with this. You can use jQuery’s .animate() to take care of the transition for you.

    $('#search').click(function() {
        $('#navigation').animate({width: '100px'}, 500);
    }
    

    This would shrink the width of the navigation to 100px when you click on the search element and animate that transition over 0.5 seconds.

    You would probably need to play around with the CSS to stop the flow of your page breaking, but setting the overflow property should take of that quite easily.

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

Sidebar

Related Questions

I am looking into writing web based games using just Javascript, HTML, and CSS.
I'm writing some code (just for fun so far) in Python that will store
I am just curious, I am writing some notes for a friend and am
Just putting part of some code here where I am writing two values to
I'm writing a little app that displays some graphics and just now I'm trying
I'm just writing a test application to work out how I can optimise searching
I've just finished writing a pretty substantial amount of Javascript (I'll spare you everything
I've just started writing a reasonably straightforward site using sinatra. My problem is that
So I am writing something using augment for inheritance and for some reason I
I was just reading an article about the non-compatibility of some CSS, when it

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.