input / checkbox / radio
morebeer
- css
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!
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
Hi,
sure there is a way to do this.
Ähhmm
"If we all lived in the future of css 3, we could easily do the following…
"
input[type=checkbox], input[type=radio] {
background-color:none;
}
That works only in combination with Javascript...
> [working with css > 2.0 (or 2.1)]
>
> <http://www.dustindiaz.com/input-element-css-woes-are-over/>
Works always
css
input.radio {
...
}
html
<input type="radio" name="a" class="radio">
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!
input[type=checkbox].class { property:value }
input[type=radio].class { property:value }
Very vew properties are supported for form elements.
mfg Beat