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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:04:21+00:00 2026-06-14T07:04:21+00:00

ill show it as an image again :) I am designing a search box,

  • 0

ill show it as an image again 🙂
enter image description here

I am designing a search box, but i have faced strange error..
My goal is to make input box and settings button to look as one.
So i have styled them with borders. It would look OK, if only there wouldnt be a gap between those two elements.. And also button is 2px smaller than input box.
Here is my css

form#search
{
}
input[type=text]
{
  width: 400px;
  border-top: 1px solid rgb(217, 217, 217);
  border-right: none;
  border-bottom: 1px solid rgb(217, 217, 217);
  border-left: 1px solid rgb(217, 217, 217);
  height: 50px;
}
input[type=button]
{
  font-family: 'WebSymbolsRegular';
  width: 40px;
  border-top: 1px solid rgb(217, 217, 217);
  border-right: 1px solid rgb(217, 217, 217);
  border-bottom: 1px solid rgb(217, 217, 217);
  border-left: none;
  background: white;
  height: 50px;
}
input[type=submit]
{
  font-family: 'WebSymbolsRegular';
  height: 50px;
}

And here is html, as requested by sachleen. Nothing special here..

<form id="search">
    <input type="text" name="search" placeholder="search" tabindex="1"/>
    <input type="button" value="S" tabindex="3"/>
    <input type="submit" value="L" tabindex="2"/>
</form>

I havent made any rules, to make those gaps. Adding margin or padding : 0, changes nothing.
I am also using Eric Meyer’s “Reset CSS” 2.0 to reset css.

  • 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-14T07:04:23+00:00Added an answer on June 14, 2026 at 7:04 am

    This worked for me

    form {
      border: 1px solid rgb(217, 217, 217);
      width: 598px;
      background: green;
      font-size:0;  
    
      input {
        padding: 0px;
        border: 0px;
        font-size:18px; 
        height: 30px;
        background: white; 
      }
      input[type='text'] {
        width: 498px;
      }
      input[type='button'], input[type='submit'] {
        width: 50px;
      }
    }
    

    Found ultimate sollution! And works the same on all browsers. Key – font-size: 0 on parent ontainer (form in this case), setting paddings to 0px, and same heights for all inputs. I set form width to 598 (+2 * 1 px border), and i can set input width to sum 598. Now i dont need to use fancy display: box and float: left to break everything.

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

Sidebar

Related Questions

I'll show you my problem by image. I have tableView in which i customize
I have a page on a site that's supposed to show an image for
I know I have to be doing something wrong, but again I don't fully
ill have an if statement if (int1 < int2) {} else {} I want
Ill first tell you what I am doing. I have three activities in the
I really think that here ill found my answers... I try to make a
I dont think this is possible in c# but ill post it anyway. Given
I have a website and it uses a lytebox to show some images and
Hi this question or problem i have its very hard i have search and
am using TableLayoutPanel to show the images.. here dynamically i ll add lot image

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.