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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make the checkbox color??

Status
Not open for further replies.

hungnguyen

Programmer
Sep 22, 2000
43
US
Hi all,

Is there anyway we can make the checkmark in checkbox colored?? By deault, the color of the check box is black, and I would like to make to red or white if posible!!!

bye
Hung Nguyen
 
I do not believe this is possible. Each browser is free to handle the displaying of controls, such as this, in its own manner. Even if one browser made this functionality available, you couldn't count on all browsers acting in the same manner.

Try using some javascript to replicate this action. Have an Uncheckedbox.gif and a Checkedbox.gif. When the user clicks the .gif, toggle which is shown and toggle a javascript variable holding the state of the .gif OR toggle the value of a hidden checkbox input field.
 
There are little possibilities with the use of CSS (but that will not work in all browsers); changing the checkmark is not possible. Simulating it with two different gif's is the best strategy. br
Gerard
(-:

Better a known bug then a new release.
 
Thanks for answering the posted question.
I do use the .gif file.
bye
take care
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top