Float the contents of a boostrap column

0

Very good, I have been involved with something for some time and I come to you to see if you can help me.

I have a boostrap column and I would like to be able to align the content of this one side or the other, I have read that it is float but there is no way. This is the code.

<div class="row  ">
            <div class="col-md-2 row-no-padding "  >
                <h5><span class="modal-title label label-default" id="exampleModalLabel">Proyectos</span></h5>
            </div>
            <div class="col-md-12  row-no-padding"  >
                <label class="checkbox-inline "><input type="checkbox" id="chkOf" value="">Desactivados</label>
            </div>
        </div>

In this case, the content that I want to paste completely to the right is the check disabled. I would like it to remain stuck to the right, regardless of the resolution of the screen.

Thank you very much

    
asked by Lorenzo Martín 26.10.2017 в 09:38
source

1 answer

1

You can apply a style with float: right to element label :

.right-align{
  float: right;
  padding-right: 5px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<div class="row  ">
    <div class="col-md-2 row-no-padding "  >
        <h5><span class="modal-title label label-default" id="exampleModalLabel">Proyectos</span></h5>
    </div>
    <div class="col-md-10  row-no-padding"  >
        <label class="checkbox-inline right-align"><input type="checkbox" id="chkOf" value="">Desactivados</label>
    </div>
</div>
    
answered by 26.10.2017 / 09:50
source