12
4

4 回答 4

19

Display inline-block does nothing, as inputs already have that display set by default. Add border:none. When you do so, it starts behaving like you want it to. Here's the fiddle -> http://jsfiddle.net/joplomacedo/XmS6m/1/

于 2012-06-11T12:56:59.297 回答
2

Button is an inline-level element. You need to change that to block or inline-block:

#my_button { display: inline-block; height: 200px; }

Live Example

于 2012-06-11T09:01:13.290 回答
1

Try setting the box-sizing property to content-box:

.my-button {
  box-sizing: content-box;
  height: 200px;
}
于 2019-12-16T10:15:36.667 回答
0

You can also increase the font-size of the button to enlarge it.

于 2016-07-15T04:50:26.907 回答