0

i want to change inner background color of Checkbox i mean the white square i searched too much but the most of the article simply said create the div and change the background color of div but this method doesn't change the white square.

3 Answers3

2

Checkboxes (also radio and select) are not like other HTML elements. They're tied closely to the standard controls that are part of the operating system. You don't have much control over how they are rendered.

There are JavaScript-based alternatives (and even some clever CSS hacks that use overlays) but the controls themselves cannot be styled the way you want.

Diodeus - James MacFarlane
  • 112,730
  • 33
  • 157
  • 176
0

Most browsers use the native checkbox style of the underlying operating system. I would use HTML/CSS/JS to create a custom checkbox, that you can style however you want.

Hein Andre Grønnestad
  • 6,885
  • 2
  • 31
  • 43
0

This is a pretty common question because checkboxes aren't typical HTML elements. Here's a pretty good answer. Know your issue isn't without solution, its just not as easy as it might be with "standard" CSS3. Here's a nice tool to generate checboxes without javascript.

Community
  • 1
  • 1
Kad
  • 639
  • 8
  • 25