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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:34:19+00:00 2026-06-03T00:34:19+00:00

I am having a ridiculous problem where my input text field and submit buttons

  • 0

I am having a ridiculous problem where my input text field and submit buttons are not lining up and I really can’t figure out an elegant solution of how to fix it. As you can see in the image below, the input text field (labeled “Enter Keywords” in the upper right”) is 2px higher than the “Search” submit button:

Input field is 2px above submit button

Here is the HTML:

<div id="search">
    <form action="#" method="POST" id="search_form">
        <div id="search_inputs">
            <input type="text" placeholder="Enter Keywords" name="keywords" />
            <input class="button" type="submit" name="search" value="SEARCH" />
        </div>
    </form>
</div>

Here is the css code:

#search_form .button {
    background: black;
    color: white;
    padding: 3px 15px;
    border: none;
    font-size: 7pt;
    height: 18px;
}

#search_form input[name="keywords"] {
    width: 175px;
}

#search {
    margin-top: 7px;
    float: right;
}

I’m pretty sure setting the font-size to 7pt is messing it up, but I’m not sure why and I don’t know how to deal with this because that’s the font size of my other buttons in the area.

Thanks for any help!

  • 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-03T00:34:22+00:00Added an answer on June 3, 2026 at 12:34 am

    adding a float: left; to the #search_form input[name="keywords"] style align’s their tops correctly, then adding some margin-right should get you good to go.

    Fiddle

    The issue stems from the float: right on the search button. The input box has a natural display: inline-block to it, which causes the slight drop. Normally when you float right the fix to this is to move that element upwards in the DOM. This won’t work in this case. By changing the input to a floated element you are also forcing it to be display: inline.

    Though I’m not sure why you can’t just add a display: inline to the element.

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

Sidebar

Related Questions

I feel ridiculous having to ask this, but I can't tell if maven-qunit-plugin is
I'm having a problem with CSS not displaying correctly between IE and Firefox... The
I'm having a very odd problem in C# and I'm not sure what is
OK. I'm having a ridiculous problem. I'm trying to use URL rewrite to redirection
I'm having a seriously annoying problem on which I've been spending a ridiculous amount
I think I'm having a brain freeze here but I cannot figure out the
Having a bit of a problem, Due to the source-control set-up we use, each
I'm having a ridiculous time trying to get an SMS API working ( ZeepMobile
I'm having a fundamental problem with getting scrolling to work normally on my iPhone
Having dutifully normalised all my data, I'm having a problem combining 3NF rows into

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.