lundi 18 juillet 2016

Multiple checked selectors CSS not working

I'm making my own toggle thing in CSS however, I have a problem. Only the top selector works. The bottom one doesn't. Is there a way to solve get around this? Also, the same thing happens when I switch the ordering of the selectors so it isn't a classname issue.

        .toggle__checkbox:checked + .toggle__wrap{
            background-color: #D24D57;
            border-color: #D24D57;
            transition: background-color .25s, border-color .25s;
        }
        .toggle__checkbox:checked  .toggle__button{
            margin-left: 20px;
            transition: margin-left .25s;
        }




Aucun commentaire:

Enregistrer un commentaire