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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:12:21+00:00 2026-06-11T01:12:21+00:00

I have created a from with the code below: HTML: <form> <div class=searchInputBox> <input

  • 0

I have created a from with the code below:

HTML:

<form>
   <div class="searchInputBox">
      <input type="text" tabindex="99" class="searchInput">
      <input type="submit" tabindex="100" class="searchbutton">
   </div>
</form>

CSS:

.searchInputBox {
    float: left;
    width: 270px;
}
.searchInput:focus + .searchbutton {
    visibility: visible;
}
.searchInput:focus {
    background: url("http://lostcoastoutpost.com/media/img/icons/toolbar_find.png") no-repeat scroll 219px 6px rgba(255, 255, 255, 0.4);
    color: #000000;
    padding: 7px 35px 7px 15px;
    width: 195px;
}
.searchInput {
    background: url("http://lostcoastoutpost.com/media/img/icons/toolbar_find.png") no-repeat scroll 10px 6px rgba(255, 255, 255, 0.3);
    border: 1px solid #ccc;
    color: #D7D7D7;
    float: left;
    padding: 7px 15px 7px 35px;
    width: 150px;
}
.searchbutton {
    background: none repeat scroll 0 0 transparent;
    border-color: transparent;
    color: transparent;
    cursor: pointer;
    float: left;
    height: 16px;
    left: -26px;
    margin: 6px 0;
    position: relative;
    visibility: hidden;
    width: 16px;
}

The submit button becomes visible in the area the magnifier is, after the input text area gets focus. However, clicking on it results in the text input are losing focus instead of submitting the form.

Is there any way this could be fixed? Only with CSS preferably…

  • 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-11T01:12:23+00:00Added an answer on June 11, 2026 at 1:12 am

    Your button is always there, the problem is that when your input loses focus, it shrinks back, causing you DIV to shrink back, and chain-causes your button to move left.

    Not to mention the background image also swiched back…

    Judging by your background image, this may be a one-field search form, which may be proper to force users to input something before search, so here’s a little hack:

    fiddle:

    http://jsfiddle.net/7LENQ/

    CSS:

    .searchInput:valid + .searchbutton {
        visibility:visible;
    }
    .searchInput:focus, .searchInput:valid {
        background: url("http://lostcoastoutpost.com/media/img/icons/toolbar_find.png") no-repeat scroll 219px 6px rgba(255, 255, 255, 0.4);
        color: #000000;
        padding: 7px 35px 7px 15px;
        width: 195px;
    }
    

    HTML:

    <input type="text" tabindex="99" pattern=".+" required class="searchInput">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a quick jQuery question: First, my HTML: <div id=taskinput> <form> <input id=taskinput-box
I have created my android code wherein I fetch all the data from facebook
I have created a piece of code which takes an IP address (from main
I have a .NET assembly DLL that is created on-the-fly from pre-compiled code in
Let's say I have created two objects from class foo and now want to
I have created a class derived from NSImageView. However, the classes's constructor (init) is
I have created my application that has search form and below contains results for
I have created a php person class and a very basic form. The form
How can i implement the below code with jQuery/AJAX timer,(I have created 2 URL
I have a html file which select images from user's computer.code is given bellow

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.