Forum Moderators: not2easy

Message Too Old, No Replies

radio button CSS

         

sssweb

4:09 pm on Jan 11, 2008 (gmt 0)

10+ Year Member



What is the CSS for getting rid of the border around radio buttons? I'm using an internal style sheet; the following works, but it gets of the border on other input elements too, which I don't want.

<style type="text/css">
<!--
input { border: 0px; }
-->
</style>

I tried:

input radio { border: 0px; }
input.radio { border: 0px; }
input, radio { border: 0px; }
input [type="radio"] { border: 0px; } (as suggested by w3school.com)

but none work.

(I know I can do it with an in-line style, but there are many buttons on the page; I want to simplify it by using an internal style sheet.)

your_store

10:16 pm on Jan 11, 2008 (gmt 0)

10+ Year Member



input[type="radio"] w/o a space before the first square bracket. However, the above will not work for all browsers. I tend to wrap my radio buttons w/ a fieldset then select them though that. So I'd have..

fieldset.radio
input
input
input

then select them with:

.radio input

sssweb

1:02 pm on Jan 13, 2008 (gmt 0)

10+ Year Member



Ok, thanks.