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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:31:50+00:00 2026-06-11T00:31:50+00:00

I created an input field in a div The div height is auto but

  • 0

I created an input field in a div

The div height is auto but unfortunately the searchbar_home div height is not increasing to surround my input box and submit button.

Here’s my HTML

  <div id='container'>    
    <div id="content">
        <h1 class="home_title">English to Malayalam</h1>
        <div id="searchbar_home">
            <input type="text" />
            <input type="submit" />
        </div>
    </div>
    <footer>
        <p>Copy right only for me ;)</p>
    </footer>

  </div>​

My CSS:

#searchbar_home{
    margin: 0 auto 20px;
    padding: 10px;
    height: auto;
    width: 80%;
    background: #F5F5F5;
    border: 1px solid #D8D8D8;

    border-radius: 6px;
}
#searchbar_home:after{
    clear: both;
}
#searchbar_home input[type="text"]{
    height: 35px;
    float: left;
    width: 90%;
    border: 1px solid #CCCCCC;
    border-right: none;

    border-radius: 6px 0 0 6px;
}
#searchbar_home input[type="submit"]{
    float: left;
    background: #414141;
    height: 40px;
    width: 50px;
}​

Here is the demo on jsfiddle.

here the image demo

How do I get the `searchbar_home“div’ to increase in size?

  • 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-11T00:31:52+00:00Added an answer on June 11, 2026 at 12:31 am

    Ah you’ve tried to use the :after trick for clearing your floats?

    From your code:

        #searchbar_home:after{
             clear: both;
        }
    

    You’ll need to actually give it some content and make it a block item rather than inline –

        #searchbar_home:after{
             content:'';
             display:block;
             clear: both;
        }
    

    Should work.

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

Sidebar

Related Questions

I have just created add input field with <a id=add>Add</a> link button which is
I have created add button to create input field. Let me show you my
I have created a placeholder around an <input> field: HTML: <div style=position: relative;font-size: 20px;>
I have created a add input field function which is working fine. I would
I create a subscribe block in my page, include text box and button submit.
I have an INPUT text field, a DIV and an IMG. The IMG has
How come when I write a click() event where the input field (created by
I created an input page with a textbox in every field, and it's working.
I've created a few input fields, that I am cleaning up as the user
By default, Zend_Form creates a hidden input field for each checkbox input in the

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.