Reputation: 345
I have a form with form fields and I want to float labels to right, but when text in label is large - float is not working.
Css
.col-xs-6 label{
float: right;
}
My Code Here
Where I'm wrong?
UPD: About
label{
text-align: right;
}
here is example it solve just large text problem. But
label{
text-align: right;
float: right;
}
is working fine)
Upvotes: 0
Views: 535
Reputation: 16936
Try text-align:right;
on <label>
(if that is what you mean with "float is not working"):
label {
text-align:right;
float: right;
}
Upvotes: 2
Reputation: 954
giving also float to input parent
I mean like this part which i edit for you
<div class="col-xs-4 pull-right">
<label style="text-align:right">Some description</label>
</div>
<div class="col-xs-6 pull-right">
<input type="text">
</div>
and other part can be like this
Upvotes: 0