Click to See Complete Forum and Search --> : how to border=0px for input=radio


ofir
08-15-2005, 07:35 AM
some browsers (IE) can show an ugly border around input type radio/checkbox.
this is bkuz i uset a style for all inputs.

how can i write "border-width: 0px" for input type=radio/checkbox ONLY.

ofir
08-16-2005, 02:15 AM
bump

NogDog
08-16-2005, 06:18 AM
I think you'd have to define it for a class in your CSS, then assign that class to the checkbox input element:
CSS:
.check { border: none; }
HTML:
<input type="checkbox" class="check" value="1">

ofir
08-16-2005, 07:20 AM
that is what i m doing now..
i thought there must be some more 'elegant' solution.
something like :input[type = "radio] { border: none;}
that work for ALL browsers

look here:
http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors

ray326
08-16-2005, 04:02 PM
If "ALL browsers" didn't include IE then that would work. Maybe in 7.

ofir
08-18-2005, 02:57 AM
by that do u mean ONLY IE is not supporting this ?
does ALL other browsers (except IE) support this ?
if so - is there a hack for IE ?

Fang
08-18-2005, 03:20 AM
All modern browsers support the Attribute Value Selector, except IE
Use class as suggested by NogDog. You could use JavaScript, but it's not advisable.

leahfitch
08-18-2005, 09:54 AM
using javascript you could use an image for your radio button - something that even looks like a star! but why bother...