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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:50:20+00:00 2026-06-04T04:50:20+00:00

Hey guys Im currently trying to get a textbox a select menu and a

  • 0

Hey guys Im currently trying to get a textbox a select menu and a button all into one sized div cleanly but im running into an issue where each element has odd borders/margins which prevent it from rendering properly (the button appears below the text box and select menu)

Heres the html Im currently using

<div class="content">
    <div class="search-panel">
        <div class="search-panel-logo">
            <img src="img.png" class="search-panel-logo-img" />
        </div>

        <div class="search-panel-searchbar">
            <form class="search-panel-frm" action="" id="fsearchbar">
                <input class="search-panel-frm" type="text" id="tseachtext" name="tsearchtext" value="Search" />
                <select class="search-panel-frm" id="ssearchselect" name="ssearchselect">
                    <option value="Cars">Cars</option> 
                </select>
                <input class="search-panel-frm" type="button" id="bsearchgo" name="bsearchgo" value="Search!" />
            </form>

        </div>
    </div>
</div>

and heres the CSS:

.content {
    background:inherit;
    width:950px;
    height:600px;
    margin: 0 auto;
}

.search-panel {
    width:inherit;
    height:500px;
    background:#093;
    margin:0 auto;

}
.search-panel-searchbar {
    width:inherit;
    height:30px;

}

.search-panel-searchbar-frm {
    width:inherit;
    height:inherit;

}

.search-panel-searchbar-frm-text {
    width:60%;
    height:70%;

}

.search-panel-searchbar-frm-select {
    width:20%;
    height:80%;

}

.search-panel-searchbar-frm-go {
    width:20%;
    height:80%;

}

any idea what I can add to get all the elements to appear in one line as opposed to two, Ive already tried

border:0;
margin:0;

and it didnt fix the problem.

  • 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-04T04:50:22+00:00Added an answer on June 4, 2026 at 4:50 am

    To achieve your goal, some CSS tricks had to be applied, see below the CSS:

    CSS

    /* wrapper */
    .search-panel-searchbar {
        width: 100%;
        height: 30px;
        overflow: hidden;
    }
    
    /* form elements must be wrapped and not a direct child of the form tag */
    .search-panel-searchbar > form > div {
        background-color: #fff;
        width: 100%;
        height:30px;
    }
    
    /* input[type="text"] */
    .search-panel-searchbar-frm-text {
        margin: 0;
        padding: 0;
        font-size: 12px;
        line-height: 16px;
        height: 16px;  /* necessary to fix height issue on windows browsers */
        padding: 6px 0;
        display: block;
        border: 1px solid #ccc;
        background-color:#fff;
        width: 60%;
        text-indent: 4px;
        float: left;
    }
    
    /* select */
    .search-panel-searchbar-frm-select {
        margin: 0;
        padding: 0;
        font-size: 12px;
        height: 30px;
        padding: 6px 4px;
        display: block;
        border: 1px solid #ccc;
        background-color:#fff;
        width: 20%;
        float: left;
        margin-left:-1px; /* pull to prevent border overflow issue with % */
    }
    
    /* input[type="button"] */
    .search-panel-searchbar-frm-go {
        margin: 0;
        padding: 0;
        font-size: 12px;
        height: 30px;
        padding: 6px 0;
        display: block;
        border: 1px solid #ccc;
        background-color:#fff;
        width: 20%;
        float: left;
        text-align:center;
        margin-left:-1px; /* pull to prevent border overflow issue with % */
        cursor: pointer;
    }
    

    Note:

    CSS does not include style given on the Fiddle example to a visual demonstration, like the button hover and body background.


    Please take note that unfortunately, each browser (and OS!) deals with the select in different ways, and it’s likely that on one or two browsers, the style may differ.

    The working Fiddle example!

    enter image description here

    Screen shot matches tests performed on:

    Linux Ubuntu 12.04

    • Firefox 12.0
    • Chromium 18.0.1025.151 (Developer Build 130497 Linux)

    Windows XP Profissional versão 2002 Service Pack 3

    • Internet Explorer 8.0.6001.18702
    • Opera 11.62
    • Firefox 3.6.16
    • Safari 5.1.2 (only select box height fail)
    • Google Chrome 18.0.1025.168 m
    • K-Meleon 1.5.4 (fail due to font-family)

    Windows 7 Home Edition Service Pack 1

    • Internet Explorer 9.0.8112.164211C
    • Opera 11.62
    • Firefox 12.0
    • Safari 5.1.4
    • Google Chrome 18.0.1025.168 m

    The font-family that you will use must contain a font family declaration at the end to prevent line-height and text-size issues. e.g., font-family: Helvetica, Arial, sans-serif

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

Sidebar

Related Questions

Hey guys quick question, I currently have an insert statement $query= INSERT into new_mail
Hey guys, I currently present my mp3s by referencing their file location into a
Hey guys, I'm currently testing my app by adding the setting bundle into my
Hey guys, I'm currently trying to implement a function using C that takes in
Hey guys I managed to get a text input and select box to updated
Hey guys and girls, i'm stumped. Trying to get array_search to work with this
Hey guys i'm trying to figure out how to subtract one time from another
Hey guys Im currently trying to debug some code for a mysqli encapsulation class.
Hey guys I have a query that currently finds the latest comment for each
Hey Guys, here is my code for this, the only help i get from

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.