eozzy
eozzy

Reputation: 68670

Styling the Checkbox - Changing the label color

It almost works, except on the checked state, I can't change the label color.

input[type="checkbox"].custom:checked label {
    color: #fff;    
}

http://jsbin.com/vupow/1/

Upvotes: 3

Views: 113

Answers (1)

John
John

Reputation: 218

  1. Remove the :before selector
  2. You can also just merge the two css entries into one

.

input[type="checkbox"].custom:checked + label {
background: #1c6db5;
color: #ffffff; 
}

jsBin

Upvotes: 2

Related Questions