Aligning inputs on bootstrap using the Fluid Grid System

Posted by sguha on Stack Overflow See other posts from Stack Overflow or by sguha
Published on 2012-10-12T00:56:41Z Indexed on 2012/10/16 17:02 UTC
Read the original article Hit count: 259

I am creating a form that requires the user to input their name and email address. The first line of the form has two inputs side by side for each part of the name and the 2nd line has one input for the email address that should be the same width as the first line combined. I'm trying to use the fluid grid system but can't line up the 2nd row with the first.

<form action="/subscriptions" method="post">
  <fieldset>
    <div class="control-group">
       <label class="control-label" for="name">Name</label>
       <div class="controls row-fluid">
          <input class="span2" id="first_name" name="first_name" placeholder="First" required="required" type="text">
          <input class="span2" id="last_name" name="last_name" placeholder="Last" required="required" type="text">
       </div>
    </div>
    <div class="control-group">
      <label class="control-label" for="email">Email</label>
      <div class="controls row-fluid">
      <input class="span4" id="email" name="email" type="email">
    </div>
   </div>
 </fieldset>
</form>?

http://jsfiddle.net/sguha095/v4amX/

© Stack Overflow or respective owner

Related posts about forms

Related posts about twitter-bootstrap