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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:25:48+00:00 2026-06-17T02:25:48+00:00

I’ve made a form using HTML with two columns for the input fields and

  • 0

I’ve made a form using HTML with two columns for the input fields and then a ‘footer’ row with the forms submit button and other text in it.

The basic form as it stands looks like this,

 _______________________________
|                               |
| Input 1          Input 2      |
|                               |
| Input 3          Input 3      |    
|                               |
| Submit           Text         |
|_______________________________|

However, I wan’t the Submit button and the text to float it to the right but it breaks my layout :/

<div id="form-wrapper">
  <form id="contact_form" method="post" action="url/to/your/server/here">
    <!-- FIRST float left -->
    <div class="float-left c1">
      <ul>
        <li>       
          <label for="name" id="name" >Name<span class="required"> *</span></label>
          <input type="text" name="name" placeholder="John Doe" autocomplete="off" required>
        </li>
        <li>
          <label for="telephone" id="telephone" >Contact Number<span class="required"> *</span></label>
          <input type="tel" name="telephone" placeholder="(01225) 123456" autocomplete="off" required>
        </li>
        <li>
          <label for="email" id="email">Email:</label>
          <input type="email" name="email address" placeholder="example@example.com">
        </li>
      </u>
    </div>


    <!-- SECOND float left -->
    <div class="float-left c2">
      <ul>
        <li>
          <label for="enquiry">Enquiry:</label>  
          <select id="enquiry" name="enquiry">  
          <option value="general">General</option>  
          <option value="sales">Sales</option>  
          <option value="support">Support</option>  
          </select>
        </li>
        <li>
          <label for="Message" id="Message" >Message<span class="required"> *</span></label>
          <textarea name="message" cols="40" rows="6" required placeholder="Enter your message"></textarea>
        </li>
      </ul>
    </div>       

    <!-- Clear - notice this is a sibling of the els with floats -->
    <div class="form_footer">
      <ul>
        <li><span id="required_field">* Required fields</span></li>
        <li><button class="submit" type="submit">Submit</button></li>
      </ul>
    </div>
  </form>
</div>


a { 
    outline: none; 
}

html, body {
    background:url(images/bg.png);
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.915em;
    line-height: 14px;
    }

#form-wrapper {
    width: 550px;
    display: block;
    background: #f6f4f4;
    border: #d2cece solid 1px;
    }

#required_field {
    float: right;
    padding: 0 40px 10px 0;
    color: #D45252;
    font-size: 11px;
    font-weight: bold;
    font-family: Lucida Sans, Lucida Grande, Lucida Sans Unicode, sans-serif;
    }

.required {
    color: #D45252;
    font-weight: bold;
    }

#contact_form ul li {
    list-style: none;
    position:relative;
    }

input, textarea, select {
    background:url(images/bg.png);
    font-family: Helvetica, Arial, sans-serif;
    display: block;
    margin: 10px 10px 15px 0px;
    resize: none;
    -moz-border-radius: 3px;
    border-radius: 3px;
    }

/* chrome, safari */  
::-webkit-input-placeholder {  
    color:#CCC;  
}  
/* mozilla */  
input:-moz-placeholder, textarea:-moz-placeholder {  
    color:#CCC;  
}  
/* ie (faux placeholder) */  
input.placeholder-text, textarea.placeholder-text  {  
    color:#CCC;    
} 


.submit {
    font-family: Helvetica, Arial, sans-serif;
    }

.float-left {
    float: left;
}

.float-right {
    float: right;
}

.form_footer {
    clear: both;
}
  • 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-17T02:25:49+00:00Added an answer on June 17, 2026 at 2:25 am

    Floating elements can break your layout if you don’t clear the floats of the parent element.
    That’s exactly what’s happening in your code.

    You are floating the submit button without any clearfix to the main parent div, in this very case <div id="form-wrapper".

    Just apply a good clearfix to the wrapper and you should be good to go.
    I posted this solution on my jsbin.

    I used Nicolas Gallagher’s micro clearfix hack.

    As a reference you can read this SO thread.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have thousands of HTML files to process using Groovy/Java and I need to
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am using JSon response to parse title,date content and thumbnail images and place
I have this code to decode numeric html entities to the UTF8 equivalent character.
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.