Place the checkbox label on the left of it [closed]

0

I'm trying to put the checkbox label on his left but I can not, could you help me?

<label>
    <span>Text goes here</span>
    <input type="checkbox" class="checkbox style-2 " checked="checked">
</label>

Try this, but it still does not work, it only works when I leave the label below the input , but that way it puts checkbox to the right of the label and, in this case, the left.

As in the image below:

    
asked by anonymous 19.10.2018 / 23:22

1 answer

1

It works fine with Bootstrap 4 I think with the 3 version also works:

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">

<div class="alert alert-primary">
  <label for="checkbox1">Free</label> 
  <input type="checkbox" class="checkbox style-2" id="checkbox1" checked="checked">
</div>

<br>

<div class="alert alert-success">
  <input type="checkbox" class="checkbox style-2" id="checkbox2" checked="checked">
  <label for="checkbox2">Free</label>
</div>
    
20.10.2018 / 00:02