|
Posted by Nik Coughlin on 02/16/06 02:20
Nik Coughlin wrote:
> Stefan Mueller wrote:
>> With 'background-color' I can set the color of an input box. But how
>> can I set the color of the inner area of a checkbox?
>
> You have your normal checkbox, unstyled. You use JavaScript to hide
> it (so that it is still on the page but invisible) and use JavaScript
> to add your replacement checkbox, which is just a boring old <img>. You
> then use the onclick event of the image to switch between two
> custom images, one for checked and one for unchecked. At the same
> time you set the hidden checkbox to be checked or unchecked. When
> the form is submitted it gets the value from your hidden checkbox. If the
> user doesn't have Javascript enabled then they just get the
> normal unstyled checkbox as a fallback.
http://nrkn.com/customCheck/
Navigation:
[Reply to this message]
|