dimanche 16 décembre 2018

Custom CSS Checkbox with pseudo element not selectable, not working

I have a question on how do make a custom css checkbox in a contact form work. After some research I went with the suggested approach to use a ::before and ::after pseudo class on my label-element. With hover and so on, and it looked okay.

But once I want to select a checkbox and click on it, the after-state of the checkbox disappears and it seems like nothing was selected.

I searched a lot but didn't find the right solution yet. Hopefully someone can help me out.

Thank you in advance!

Here is my jsfiddle: https://jsfiddle.net/trsxj0o2/

Here the HTML:
<!Doctype html> ...Complete Code is in the jsfiddle. 

Note: Yes, I know the white background isn't fitting, don't let that distract you ;-) Besides I am new to stackoverflow and the jsfiddle, so if it isn't working please let me know.




Aucun commentaire:

Enregistrer un commentaire