开发者

CSS Padding Issue w/ submit button

开发者 https://www.devze.com 2023-01-04 07:09 出处:网络
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 h开发者_如何学JAVAeight of the button never changes. Here is

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 h开发者_如何学JAVAeight 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号