It's easier to explain what I need with a fiddle: http://jsfiddle.net/mZrYG/1/
As you can see, when the output screen is fully extended, the sign in button is placed on the line under the label. I'm trying to get it so that the checkbox is left aligned and the button is right aligned on the same line. What's wrong with my css?
For prosperity:
<div class="row">
<div class="span3">
<form class="signin" method="POST">
<input type="text" placeholder="Username" name="username" />
<input type="password" placeholder="Password" name="password" />
<label class="checkbox">
<input type="checkbox" name="form[remember]" /> Remember me
</label>
<button class="btn btn-mini btn-primary pull-right" type="submit">Sign in</button>
</form>
</div>
</div>
We can align the buttons horizontally as well as vertically. We can center the button by using the following methods: text-align: center - By setting the value of text-align property of parent div tag to the center. margin: auto - By setting the value of margin property to auto.
We specify the margin-bottom of our <div> element. Then, we set the display of the <label> element to "inline-block" and give a fixed width. After that, set the text-align property to "right", and the labels will be aligned with the inputs on the right side.
Align the text left or right Select the text that you want to align. On the Home tab, in the Paragraph group, click Align Left or Align Right .
Demo
Hi now used to display:inline-block
in your label
as like this
label {
display: inline-block;
margin-bottom: 5px;
vertical-align: top;
}
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