Steve Bohler
asked on
asp.net radiobutton size
Hello,
I have a control of type RadioButton.
How do I make the radiobuttons larger?
Thanks in advance.
I have a control of type RadioButton.
How do I make the radiobuttons larger?
Thanks in advance.
I'm not sure of this, but tryrb1.styles.Add("font-size" ,"12");
ASKER
I want to change the size of the buttons, not the size of the text.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?
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:
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/unifor m
So that your folder structure would look like this after unzipping:
<site_root>/scripts/unifor m/jquery.u niform.js
<site_root>/scripts/unifor m/css/unif orm.defaul t.css
<site_root>/scripts/unifor m/images/b g-input.pn g
<site_root>/scripts/unifor m/images/b g-input-fo cus.png
<site_root>/scripts/unifor m/images/s prite.png
Then put this in the HEAD of your document AFTER the jQuery inclusion:
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.
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
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/unifor
So that your folder structure would look like this after unzipping:
<site_root>/scripts/unifor
<site_root>/scripts/unifor
<site_root>/scripts/unifor
<site_root>/scripts/unifor
<site_root>/scripts/unifor
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>
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>