html - Semantic UI, positioning labels -
i'm using checkbox in semantic ui. switch position of label , input it's proving kind of pain. using toggle checkbox.
<div class="ui toggle checkbox"> <input id="privacy" type="checkbox" checked="checked"> <label for="privacy">public</label> </div>
semantic ui checkboxes docs here: http://semantic-ui.com/modules/checkbox.html#/definition
if switch input , label in html, toggle function stops working. can't seem position elements relatively... there easy class can add or enable input , label have switched positioning while still maintaining functionality of red-green toggle?
thanks..
update: i'm working on fiddle here: includes semantic ui css , js.
this can do:
.ui.toggle.checkbox label { padding-left:0; padding-right:4em; } .ui.checkbox input, .ui.toggle.checkbox label:before { left:auto; right:0; } .ui.toggle.checkbox label:after { left:auto; right:1.75em; transition:background 0.3s ease 0s, right 0.3s ease 0s; } .ui.toggle.checkbox input:checked + label:after { left:auto; right:0.5em; transition:background 0.3s ease 0s, right 0.3s ease 0s; }
the checkbox styled that. actual <input type="checkbox" />
transparent.
Comments
Post a Comment