tags:

views:

44

answers:

1

This is a dumb problem but I can't seem to set the padding on a submit button properly. No matter what I input for padding, the width and height of the button never changes. Here is the css:

.green_submit {
color: #fff;
background-color: #94c909;
border-right: 1px solid #6d9307;
border-bottom: 1px solid #6d9307;
border-left: none;
border-top: none;
padding: 25px;
}

And the HTML:

<input type="submit" class='green_submit' value="Validate" />

Any obvious problems here? How can I manipulate the padding on a submit button?

+1  A: 

Try the <button> element, it allows better styling. Also this might be because the input element is an inline element. Adding display: inline-block; might help as well.

thomask
Were you suggesting the `<button>` element? That's not a very good idea, as it won't trigger `submit` without JavaScript.
MvanGeest
I target the button element directly and it worked. Thanks!
Thomas
The button element with type=submit should work fine, unless you refer to 'hit-enter-to-submit' functionality across various browsers. I know I've had issues with that in the past.
thomask