How Do I Left Align These Bootstrap Form Items?
Solution 1:
Just my two cents. If you are using Bootstrap 3 then I would just add an extra style into your own site's stylesheet which controls the text-left
style of the control-label
.
If you were to add text-left
to the label, by default there is another style which overrides this .form-horizontal .control-label
. So if you add:
.form-horizontal.control-label.text-left{
text-align: left;
}
Then the built in text-left
style is applied to the label correctly.
Solution 2:
If you are saying that your problem is how to left align the form labels, see if this helps: http://jsfiddle.net/panchroma/8gYPQ/
Try changing the text-align left / right in the CSS
.form-horizontal.control-label{
/* text-align:right; */text-align:left;
background-color:#ffa;
}
Solution 3:
Instead of altering the original bootstrap css class create a new css file that will override the default style.
Make sure you include the new css file after including the bootstrap.css file.
In the new css file do
.form-horizontal.control-label{
text-align:left !important;
}
Solution 4:
"pull-left" is what you need, it looks like you are using Bootstrap 2, I am not sure if that is available, consider bootstrap 3, unless ofcourse it is a huge rework! ... for Bootstrap 3 but you need to make sure you have 12 columns in each row as well, otherwise you will have issues.
Solution 5:
Just add style="text-align: left"
to your label.
Post a Comment for "How Do I Left Align These Bootstrap Form Items?"