Hi, html and css question.?

  • Thread starter Thread starter WYSIWYG
  • Start date Start date
W

WYSIWYG

Guest
Hi, I have the below button in html:

<input type="button" id="mybutton" class="mybutton" value="Run" name="run_button" onClick="runSub()">

The question is... how do I change the size of the button... height and width with css as so far i can not do it. Thanks.
 
Use the inline style......:

<input type="button" style="width: 150;" id="mybutton" class="mybutton" value="Run" name="run_button" onClick="runSub()">
 
It should just be a simple case of applying a height and a width in stylesheet. I've tried this is in both Firefox 3 and IE 7 using both a class or and id (although this shouldn't ever make a difference) and it's working no problem.

Try checking your code again, any curly brackets missing from your css maybe? Here's the code I tested with:

<input class="button" type="button" value="Submit" />

.button
{
width: 100px;
height: 100px;
}

Good luck

Chris
 
style="width: 100px" you can add that into the input tag itself, or copy the width part separately to CSS.
 
Back
Top