Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > How to set the color of a checkbox

Reply
Thread Tools

How to set the color of a checkbox

 
 
Stefan Mueller
Guest
Posts: n/a
 
      02-14-2006
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?

Stefan


 
Reply With Quote
 
 
 
 
Mark Parnell
Guest
Posts: n/a
 
      02-14-2006
Deciding to do something for the good of humanity, Stefan Mueller
<(E-Mail Removed)> declared in alt.html:

> 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?


The same way, but browsers vary significantly in what they will allow
you to do with styling form elements.

--
Mark Parnell

Now implementing http://blinkynet.net/comp/uip5.html
 
Reply With Quote
 
 
 
 
Jose
Guest
Posts: n/a
 
      02-14-2006
> The same way, but browsers vary significantly in what they will allow
> you to do with styling form elements.


Well put. People think web design is setting the page up to display
"properly", but really, it is asking permission from a slew of browsers
and other display devices, all at the same time, to please do something
you'd like to happen.

Jose
--
Money: what you need when you run out of brains.
for Email, make the obvious change in the address.
 
Reply With Quote
 
Stefan Mueller
Guest
Posts: n/a
 
      02-15-2006
Does that mean that it's not possible to set the color of the area where the
check is located?
Stefan


 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      02-15-2006
With neither quill nor qualm, Stefan Mueller quothed:

> Does that mean that it's not possible to set the color of the area where the
> check is located?


Not if it's in the mail.

--
Neredbojias
Contrary to popular belief, it is believable.
 
Reply With Quote
 
Stefan Mueller
Guest
Posts: n/a
 
      02-15-2006
>> Does that mean that it's not possible to set the color of the area where
>> the
>> check is located?

>
> Not if it's in the mail.


Sorry, I'm not an English native speaker and therefore I don't understand
your answer. What are you talking about mail?
Is it possible to set the color of the area where the check of a checkbox is
located or is it not possible?

Stefan


 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      02-15-2006
Stefan Mueller wrote:
>>>Does that mean that it's not possible to set the color of the area where
>>>the
>>>check is located?

>>
>>Not if it's in the mail.

>
>
> Sorry, I'm not an English native speaker and therefore I don't understand
> your answer. What are you talking about mail?
> Is it possible to set the color of the area where the check of a checkbox is
> located or is it not possible?


A joke in response to 'where is the check located': 'The check is in the
mail' is common excuse by deadbeats to their debtors.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Jose
Guest
Posts: n/a
 
      02-15-2006
> Sorry, I'm not an English native speaker and therefore I don't understand
> your answer. What are you talking about mail?


The word "check" also means a financial instrument, and "the check is in
the mail" means "I've already sent my payment, stop bothering me, you'll
get it shortly.", often used when the check is actually =not= in the mail.

My slavic cousin was going to visit me from overseas and I went to the
airport but he wasn't on the plane. When I called his wife, she told me
that airfare was too expensive so they used the postal service. "The
Czeck is in the mail".

Jose
--
Money: what you need when you run out of brains.
for Email, make the obvious change in the address.
 
Reply With Quote
 
Mark Parnell
Guest
Posts: n/a
 
      02-15-2006
Deciding to do something for the good of humanity, Stefan Mueller
<(E-Mail Removed)> declared in alt.html:

> Sorry, I'm not an English native speaker and therefore I don't understand
> your answer. What are you talking about mail?


Don't worry - it's just a result of the American misspelling of cheque.


> Is it possible to set the color of the area where the check of a checkbox is
> located or is it not possible?


It depends on the browser. Some browsers may allow you to, some
certainly don't.

--
Mark Parnell

Now implementing http://blinkynet.net/comp/uip5.html
 
Reply With Quote
 
Nik Coughlin
Guest
Posts: n/a
 
      02-15-2006
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?
>
> Stefan


There is a very dirty way to do it... I don't know if I should tell you
though, I might get told off, because it's something that you really
shouldn't do for a whole number of useability related reasons that I won't
go into here, though I'm sure the regulars will be quick to point them out


Here's how it works.

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.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font color from current font color to black color Kamaljeet Saini Ruby 0 02-13-2009 04:58 PM
ASPNET CheckBox and a CheckBox in a TemplateField Jason Huang ASP .Net 0 06-29-2007 12:35 AM
DataGrid and embeded Checkbox..How to find if checkbox clicked =?Utf-8?B?RG90TmV0RGV2?= ASP .Net 1 10-06-2006 04:11 PM
disable checkbox list checkbox Vikram ASP .Net 1 01-25-2006 02:59 PM
Text on Checkbox below the checkbox tshad ASP .Net 0 04-14-2005 11:26 PM



Advertisments