asp.net RadioButton and CSS Class

E

epigram

I've got the following sytle:

input.bigRadio { width: 45px; height: 45px; padding: 0px 0px 0px 0px}

which I am applying to radio buttons to make them larger by applying this
bigRadio class as such:

<input name="MyName" TYPE="radio" class="bigRadio" VALUE="MyValue" checked>

This works in a static HTML file, but I'm trying to make an ASP.NET version
of this page now and when I set the class property of the RadioButton the
HTML does render as expected. ASP.NET does not add a class attribute to my
RadioButton, but instead wraps the radio button in a span tag and applies
the bigRadio class to the span tag. I suppose that ASP.NET renders this way
to allow the style to apply to the text that is associated to a radio
button, but the problem is when the class is applied to a span around the
radio button it doesn't affect the radio button as desired. Namely, it
doesn't increase the size of the radio button. I'm looking for another way
to accomplish my goal. Any help would be greatly appreciated.

Thanks,

Tim
 
B

Bruce Barker

use css inheritance:

.bigRadio input { width: 45px; height: 45px; padding: 0px 0px 0px 0px}

apply to any inputs inside a tag with class bigRadio, or to limit to inputs
inside a span with the class bigRadio:

span.bigRadio input { width: 45px; height: 45px; padding: 0px 0px 0px
0px}


-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top