Search code examples
htmlcssmaterialize

Right to left checkbox in MaterializeCSS instead of left to right


I'm working with MaterializeCSS Framework and I want to use a checkbox in a form. In default, the checkbox is in the left of my label (Left To Right in default), but I want to change the place of the check box to before my label text.

<p>
    <input type="checkbox" id="rememberme" class="" />
    <label class="right-align"  for="rememberme">Remember me</label>
</p>

Is it possible somehow?


Solution

  • when check box not checked

    [type="checkbox"]+label:before,
    [type="checkbox"]:not(.filled-in)+label:after
    {
    left:175px;
    }
    

    when the checkbx checked

    [type="checkbox"]:checked+label:before
    {
    left:175px;
    }
    

    Cascade Property Helped.