The Bootstrap guide shows a horizontal form. http://getbootstrap.com/2.3.2/base-css.html#tables I couldn't get it to style it horizontally. I created a JSFiddle -- it also doesn't work. Here's the code from the above page
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="inputEmail">Email</label>
<div class="controls">
<input type="text" id="inputEmail" placeholder="Email">
</div>
</div>
<div class="control-group">
<label class="control-label" for="inputPassword">Password</label>
<div class="controls">
<input type="password" id="inputPassword" placeholder="Password">
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox"> Remember me
</label>
<button type="submit" class="btn">Sign in</button>
</div>
</div>
</form>
I am trying to use Bootstrap to format my form to have the label on the left, textbox on the right. Seems simple, right?
http://jsfiddle.net/nwkZz/
This is what I want:
MyLabel MyTextbox
and not:
MyLabel
MyTextbox
Since you are using Bootstrap 2.1.0 you are including the wrong css, you must include the Bootstrap 2.1.0 css.
Like: //cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.1.0/css/bootstrap.min.css
Demo: http://jsfiddle.net/IrvinDominin/as9Kv/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With