Toggle button | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Toggle button

I am developing toggle button you can see in my code but its does not change the position and and not a colour I am using pure css help me ? https://code.sololearn.com/WQEY3IKcY4S0/#

19th Jun 2021, 1:06 PM
Shiv The Human Code
Shiv The Human Code - avatar
4 Answers
+ 2
https://code.sololearn.com/WYg4D1YmWLOt/?ref=app
19th Jun 2021, 1:25 PM
visph
visph - avatar
+ 1
Shubham Singh Bhadauriya translate by 38px (instead of 26px) to get the knob fully at right ;)
19th Jun 2021, 1:41 PM
visph
visph - avatar
+ 1
no you can put it inside, but that make more sense to have it outside ^^ however, selectors must change if checkbox inside label: input:checked + .switch input:checked + .slider:before
19th Jun 2021, 1:48 PM
visph
visph - avatar
0
I have a question? the input tag should always be out of label tag it is necessary ?
19th Jun 2021, 1:44 PM
Shiv The Human Code
Shiv The Human Code - avatar