MI5 MI5 - 1 year ago 59
CSS Question

How to set the height of an button (input-element) on webkit browsers?

On my Mac with webkit-browsers (Safari and Chrome, current version) I can't set the height of an input-element.

<input type="button" style="height:200px;" value="Hello World!">​

won't work.

won't work either.


Though setting the width is possible, either with style-attribute or with jQuery.

What is the reason for this inconsistency? And what is a possible solution?

Answer Source

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/

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download