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.

http://jsfiddle.net/3xkrx/30/

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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -