473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

asp.net RadioButton and CSS Class

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
Nov 23 '05 #1
1 11373
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)
"epigram" <no****@nowhere.com> wrote in message
news:11*****************************************@n ews.nntpserver.com...
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

Nov 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: VK | last post by:
Hi! What I'm missing in following code? Cannot get the values of radiobuttons. Starting only one class (GetVariant), it works. When I put two classes together, it doesn't. Regards, VK from...
11
by: William Gill | last post by:
I am placing radiobuttons in a 4 X 4 matrix (using loops) and keep references to them in a 2 dimensional list ( rBtns ). It works fine, and I can even make it so only one button per column can be...
1
by: ShivaPrem | last post by:
Hi! I have the following code private void PrintToTextBox(object sender, System.EventArgs e) { textBox1.Text =((RadioButton)sender).Name; } and I get the following message
1
by: Dmitry V. Markin | last post by:
Good day! Here is my problem: I need to have a radiobutton column in my DataGrid for a representation of a bool column, where only row can be checked at one time(only one value in bool column...
3
by: visual2005beta_developer | last post by:
I have the following problem (especially with the groupname-attribut of the RadioButton-Control) when developing in Visual Studio 2005 Beta. I load an ascx-control in an aspx-page. This...
2
by: Brano | last post by:
HI all, I have two radioButtons on my form. They both have autopostback = true and they are both in the same group. They both have event handlers for CheckedChanged event. My problem is ont of...
1
by: hellyna | last post by:
How to insert radiobutton value into the mysql? This is addrecordfrom.php <form name="addsummonrecord" method="post" action="addrecordprocess.php" id="signup" onSubmit="return...
6
by: Radiobutton via DotNetMonster.com | last post by:
i need help with radiobuttons. i am useing 1button and 2 radiobuttons i am trying to make it so when u select a radiobutton and hit button1 it will clear radiobuttons 1 and 2. -- Message...
5
by: Matt B | last post by:
I know this is a bit of nonstandard behavior, but I would like the Enter key to move focus through a group of radiobuttons without selecting them. The user would then have to use Space or actually...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.