Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Checkbox color

Status
Not open for further replies.

TomG1

Programmer
Apr 12, 2001
25
BE
hello
how can I change the inside color of a checkbox?
(not background-color cause that changes the outside)
thanks
 
AFAIK you cannot. You are just stuck with the way your OS renders checkboxes. If you really need it to look different then you'd have to use some javascript and create your own.
 
You could create images of a checkbox in both states (checked and unchecked). Color them as you see fit. Use an "onclick" event to change the image to the other state and assign the appropriate corresponding value to a hidden form field.

It's not exactly the same as using a checkbox, but I'm afraid vragabond is right. If you use a standard checkbox form element, you're at the mercy of whichever O/S your visitors are using.

Good luck,
-Ron

-We are all given the same deck of cards, it's how we play the hand we are dealt which makes us who we are.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top