Link to home
Start Free TrialLog in
Avatar of Steve Bohler
Steve BohlerFlag for United States of America

asked on

asp.net radiobutton size

Hello,

I have a control of type RadioButton.

How do I make the radiobuttons larger?

Thanks in advance.
Avatar of Obadiah Christopher
Obadiah Christopher
Flag of India image

I'm not sure of this, but tryrb1.styles.Add("font-size","12");
Avatar of Steve Bohler

ASKER

I want to change the size of the buttons, not the size of the text.
ASKER CERTIFIED SOLUTION
Avatar of Designbyonyx
Designbyonyx
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hummm... I'm in a bit over my head here. Don't know anything about jquery

How do I call jquery from within vb.net code in a .aspx.vb page?
Well, hopefully you have some experience with styling, css sprites, and a little bit of javascripting.  So you need to include jQuery in the HEAD of your document.  Use this line of code.  It's hosted by google, but it's better to let them host it:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>

Open in new window


Then, you need to download the uniform plugin.  Extract the files so that the files are in your project: there is a CSS file, a javascript file, and some images.  I suggest unzipping the plugin to a directory like this:

<site_root>/scripts/uniform

So that your folder structure would look like this after unzipping:

<site_root>/scripts/uniform/jquery.uniform.js
<site_root>/scripts/uniform/css/uniform.default.css
<site_root>/scripts/uniform/images/bg-input.png
<site_root>/scripts/uniform/images/bg-input-focus.png
<site_root>/scripts/uniform/images/sprite.png


Then put this in the HEAD of your document AFTER the jQuery inclusion:

<script src="jquery.uniform.js" type="text/javascript"></script>
<link rel="stylesheet" href="uniform.default.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript">
  $('input:radio').uniform();
</script>

Open in new window



Then, here comes the tricky part.  If you want to make the radio button bigger, you will need to edit the sprite.png image.  You will have to move things around and add your own graphics.  After that, you will need to edit the CSS styles and update the background-position for the radio button styles.

Before all of this, I suggest you take a crash course in jQuery as well as CSS sprites.  hope that helps.  Like I said in my last post, this is no easy task.  If you have a friend who is good with CSS, you should call her.  It would be worth $50 to have this done by someone with a little more experience.  Cheers.
Sorry, I didn't update the file paths for the uniform plugin.  Try doing this instead:

<script src="/scripts/uniform/jquery.uniform.js" type="text/javascript"></script>
<link rel="stylesheet" href="/scripts/uniform/css/uniform.default.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript">
  $('input:radio').uniform();
</script>

Open in new window