Click to See Complete Forum and Search --> : applying styles to radio buttons, checkboxes


ajimenez
01-21-2005, 03:53 PM
Hi everyone,

Has anyone encountered this before? I get this problem in Netscape 6.2.

I have this in the stylesheet:

form input, form select{
margin: 0;
width: 175px;
font: 1em verdana, arial, hevetica, sans-serif;
border: 1px solid #669999;
}

form input.radio, form input.checkbox {
border: 0;
width: 10px;
}

The reason I give the radio buttons and checkboxes zero border is so they don't inherit the border from the input selectors. So far it seems fine in all current browser, except in Netscape 6.2, where the actual circles that makes up the radio buttons themselves are acually not there, literally giving them a zero border. Same thing for the checkboxes. They're still functional, but you just can't see them.

Am I missing something here? Is there an easy workaround? I do have the radio buttons and checkboxes inside a label tag. I don't know if that would help any.

Any input's appreciated. Thanks.

Fang
01-22-2005, 12:35 PM
Attribute value selector:

form input[type="text"], form select{
blaa...
}
form input[type="radio"], form input[type="checkbox"] {
width: 10px;
}

ajimenez
01-24-2005, 10:21 AM
Thanks, Fang!

This pretty much solves all my issues!

ajimenez
01-24-2005, 10:55 AM
Okay... maybe not.

The styles don't seem to take effect in Internet Explorer!

Would there have to be some sort of hack in order to get it to work in IE??!?

Fang
01-24-2005, 12:13 PM
IE dosen't understand the attribute value selector.
You will have to use a class