The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
How to customize ch...
 
Share:
Notifications
Clear all

Question [Solved] How to customize checkbox color?

7 Posts
2 Users
3 Reactions
428 Views
Posts: 13
Topic starter
(@nonobio)
Eminent Member
Joined: 4 years ago

Hi,

Is it possible to change the background checkbox color (agreement and cookies):

 

image

As you can see, it is blue. I would like to use my color #ffc107

Thanks 🙂

6 Replies
Asti
Posts: 7617
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Use the CSS code below: 

#wpdcom input[type='checkbox'] {
    accent-color: #ffc107;
}

The code above is just a simple solution. Here you can find more tips: https://www.w3schools.com/howto/howto_css_custom_checkbox.asp

Posts: 13
Topic starter
(@nonobio)
Eminent Member
Joined: 4 years ago

Thanks a lot, it works, the background is yellow, but the arrow is now black:

image

Do you know how to get it white?

 

4 Replies
Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@nonobio,

I'll try to provide a solution for you soon. 

(@nonobio)
Joined: 4 years ago

Eminent Member
Posts: 13

@asti don't bother too much, it's not very important 🙂

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7617

@nonobio,

The accent-color CSS property automatically changes the color to white if the selected color is light. 

Please watch this video to better understand what I mean: https://www.screencast.com/t/QJg5QarLpb

If you change the color and set it a bit darker it'll automatically change the color to white. This is the simplest solution you can use. 

(@nonobio)
Joined: 4 years ago

Eminent Member
Posts: 13

@asti Ok, I will keep my background color, and so with the black arrow, but thanks a lot for the explanation and screencast, have a nice day 😀

Share: