<input type="button" value="submit" style="height: 100px; width: 100px; left: 250; top: 250;">
Use this with your requirements.
Change height using:
input[type=submit] {
border: none; /*rewriting standard style, it is necessary to be able to change the size*/
height: 100px;
width: 200px
}
just use style attribute with height and width option
<input type="submit" id="search" value="Search" style="height:50px; width:50px" />
Using CSS.
Either inside your <head>
tag (the #search
means "the element with an ID of search
")
<style type="text/css">
input#search
{
width: 20px;
height: 20px;
}
</style>
Or inline, in your <input>
tag
<input type="submit" id="search" value="Search" style="width: 20px; height: 20px;" />
Use the css height
and width
properties.
For this to work on Mac, you also need to set the button
's border
to none
.
That's easy!
First, give your button an id
such as <input type="button" value="I am a button!" id="myButton" />
Then, for height, and width, use CSS code:
.myButton {
width: 100px;
height: 100px;
}
You could also do this CSS:
input[type="button"] {
width: 100px;
height: 100px;
}
But that would affect all the buttons on the Page.
Working example - JSfiddle
You can change height and width with css:
#search {
height: 100px;
width: 400px;
}
It's worth pointing out that safari on OSX ignores most input button styles, however.
Just add style="width:auto"
<input type="submit" id="search" value="Search" style="width:auto" />
This worked for me in IE, Firefox and Chrome.
Source: Stackoverflow.com