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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:16:46+00:00 2026-05-23T03:16:46+00:00

I am coding a search box that expands on focus and contracts again when

  • 0

I am coding a search box that expands on focus and contracts again when you click elsewhere on the page.

The problem is that I have a submit icon to the right of the input box and as the input box is expanding (using jQuery ‘animate’) it shifts the submit icon down.

You can see what I’ve done here:

http://dl.dropbox.com/u/7966602/ID/WebContent/index.html?x=11&y=7#

Please keep in mind that the page is obviously still not done.

You should be able to view source to see the HTML and jQuery. The CSS is;

box-shadow: 0px 0px 5px #000;
height:20px;
float:right;
margin-top:24px;
margin-right:26px;
padding-top:3px;
padding-bottom:2px;
border-width: 2px;
border-style: solid;
border-color: #e5e5e5;
-moz-border-radius: 3px;
border-radius: 3px;
background: #333333;
background-image: -moz-linear-gradient(#ffffff, #e5e5e5);
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #e5e5e5),color-stop(1, #ffffff));

}

searchBoxHover #search {

font: bold 14px Arial, Helvetica;
color: #808080;
width:100px;
position:relative;
left:3px;
top:-5px;
background: #333333;
background-image: -moz-linear-gradient(#ffffff, #e5e5e5);
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #e5e5e5),color-stop(1, #ffffff));
border:0px;

}

searchBoxHover #submit {

margin:0px;
padding:0px;
border:0px;
width:21px;
height:20px;
margin-right:3px;

}

searchBox {

box-shadow: 0px 0px 5px #000;
height:20px;
float:right;
margin-top:24px;
margin-right:26px;
padding-top:3px;
padding-bottom:2px;
border-width: 2px;
border-style: solid;
border-color: #333333;
-moz-border-radius: 3px;
border-radius: 3px;
background: #333333;
background-image: -moz-linear-gradient(#333333, #1e1e1e);
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #1e1e1e),color-stop(1, #333333));

}

searchBox #search {

font: bold 14px Arial, Helvetica;
color: #808080;
width:100px;
position:relative;
left:3px;
top:-5px;
background: #333333;
background-image: -moz-linear-gradient(#313131, #202020);
background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #202020),color-stop(1, #313131));
border:0px;

}

searchBox #submit {

margin:0px;
padding:0px;
border:0px;
width:21px;
height:20px;
margin-right:3px;

}

  • 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-23T03:16:47+00:00Added an answer on May 23, 2026 at 3:16 am

    The problem is that the input is getting a display:block style while the animation is going on, then returning to display:inline.

    I can’t test a solution but I would first try to float the textbox. Just float:left the textbox (you may need to relative position the form element.. not sure).

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

Sidebar

Related Questions

I'm coding some web-applications in MVC, and I have a problem with something that
I have a website that returns search results from Twitter, written in C# ASP.NET.
I'm hand-coding Linq to SQL Entities and have a large XML column that I
i am coding my first forum and wants to have a search field. i
I have a search functionality that obtains data from an InnoDB table ( utf8_spanish_ci
I am trying to cleanup a string coming from a search box on a
When coding, what in your experience is a better approach? Break the problem down
The coding is done using VS2008 There are two divs in my page namely
I am coding a web interface for a University project and I have been
i'm coding a query engine to search through a very large sorted index file.

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.