Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to edit the size of the submit button on a form?

Tags:

html

css

forms

Hi I don't want an image for my submit button so I have gone with the default submit button but I want to edit its width and height. How do I do that?

<input type="submit" id="search" value="Search"  /> 

Thanks!

James

like image 227
James Avatar asked Sep 10 '11 19:09

James


People also ask

How do I change the size of a submit button in HTML?

Originally Answered: How do I make a button bigger in HTML? Put it inside of a div, set the div width/height to how big you want the button, then set button to 100% W, and 100% H, and 0 out margin, and padding on the button, and 0 padding on the div, but keep whatever margins you want.

How do I customize a submit button?

Change the Submit Button's AppearanceIn the Form Builder, click the Form Designer icon. Go to the Styles tab. Scroll down to the Inject Custom CSS section.

How do you increase the size of a form?

By dragging either the right edge, bottom edge, or the corner, you can resize the form. The second way you can resize the form while the designer is open, is through the properties pane. Select the form, then find the Properties pane in Visual Studio. Scroll down to size and expand it.


2 Answers

just use style attribute with height and width option

<input type="submit" id="search" value="Search"  style="height:50px; width:50px" /> 
like image 110
Mahesh Thumar Avatar answered Oct 07 '22 17:10

Mahesh Thumar


Using CSS you can set a style for that specific button using the id (#) selector:

#search {     width: 20em;  height: 2em; } 

or if you want all submit buttons to be a particular size:

input[type=submit] {     width: 20em;  height: 2em; } 

or if you want certain classes of button to be a particular style you can use CSS classes:

<input type="submit" id="search" value="Search" class="search" /> 

and

input.search {     width: 20em;  height: 2em; } 

I use ems as the measurement unit because they tend to scale better.

like image 42
Paul Grime Avatar answered Oct 07 '22 15:10

Paul Grime