View Full Version : Sizing Buttons
nathan130
11-02-2008, 11:26 PM
:| I cant figure out how to resize my buttons...
<input type="button" onclick="disp_alert()" value="Display alert box" />
mlseim
11-03-2008, 12:30 AM
Sort of a vague question, because there are submit buttons that can
be graphic or browser created ... and then you can use CSS too:
http://www.google.com/search?q=css+form+buttons&btnG=Search
And then, not sure if you mean buttons that are within forms,
submit buttons, or buttons that don't need to be in forms.
http://www.google.com/search?q=css+scalable+graphic+buttons&btnG=Search&hl=en&sa=2
nathan130
11-03-2008, 01:06 AM
Srry,
its a button thats inside a table
The button just brings up an alert box
Its not in a form, not a submit button either
Millenia
11-03-2008, 08:52 AM
Try
<input type="button" size="30" onclick="disp_alert()" value="Display alert box" />
Change the size number to make it longer/shorter.
nathan130
11-04-2008, 12:45 AM
nope :( size doesnt do anything.
oesxyl
11-04-2008, 01:08 AM
nope :( size doesnt do anything.
try css:
http://www.webreference.com/programming/css_stylish/
best regards
Rowsdower!
11-04-2008, 09:44 PM
Agreed, CSS is a good helper with this issue. Here is an example for the CSS file or else for style code to plop into your header:
input.button2
{
font-weight: bold;
width: 2.5em;
color:#000000;
font: bold 84% 'trebuchet ms',helvetica,sans-serif;
background-color:#002136;
border: 1px solid;
border-color: #999999 #999999 #999999 #999999;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#ffffffff',EndColorStr='#002136');
/*ffeeddaa*/
}
input.button2_hover
{
font-weight: bold;
width: 2.5em;
color:#000000;
font: bold 84% 'trebuchet ms',helvetica,sans-serif;
background-color:#002136;
border: 1px solid;
border-color: #999999 #999999 #999999 #999999;
filter:progid:DXImageTransform.Microsoft.Gradient
(GradientType=0,StartColorStr='#002136',EndColorStr='#ffffffff');
}
The red parts would be operative and you would of course want to match sizes between your standard and "mouseover" buttons to avoid a strobe effect when your user tries to use the button. You can use "em" "px" or "%" for the button size.
Then you'd toss this into your body where you want the button to be:
<input class="button2" type="button" onClick="disp_alert()" value="Display alert box" onmouseover="this.className='button2_hover'" onmouseout="this.className='button2'" />
Is this what you're looking for or have I misunderstood you?
stanfordrep
11-05-2008, 06:09 AM
Is it a background image that looks like a button with a text link over it?
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.