faqts : Computers : Programming : Languages : JavaScript : Forms : Checkboxes

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

16 of 30 people (53%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

How do I define a style rule for checkboxes?

Jun 3rd, 2000 07:56
Martin Honnen,


CSS2 supported in NN6 allows that:
  INPUT[type=checkbox] { background-color: lime; }
Here is a complete example:

<HTML>
<HEAD>
<STYLE>
INPUT {
  background-color: lime;
}
INPUT[type=checkbox] {
  background-color: blue;
}
</STYLE>
</HEAD>
<BODY>
<FORM>
<INPUT TYPE="text">
<INPUT TYPE="radio">
<INPUT TYPE="checkbox">
<INPUT TYPE="password">
</FORM>
</BODY>
</HTML>