YoroDiallo
YoroDiallo

Reputation: 345

large text is not floating right

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

Answers (3)

andreas
andreas

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

Balu Abraham
Balu Abraham

Reputation: 40

label  {
  text-align:right;
}

Upvotes: 1

mkafiyan
mkafiyan

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

Related Questions