Matt: input / checkbox / radio

Beitrag lesen

Is there any way to apply a style class on checkboxes and radiobuttons only? Imagine, all input tags been applied a background-color, then all checkboxes and radiobuttons also got some ugly square backgounds around. I tried something like input:radio, but this didn't work. Thx for your help!

Hi,

sure there is a way to do this.

Either you apply a class on the fields who should have a background, or you set this per "default" in your css:

input[type=checkbox], input[type=radio] {  
 background-color:none;  
}  

[working with css > 2.0 (or 2.1)]

http://www.dustindiaz.com/input-element-css-woes-are-over/

Regards,
Matt