Is there a way to turn this feature off? Contents of <button>
are always vertically centered, as opposed to what happens in a regular HTML tag.
Demo: http://jsfiddle.net/HbqnR/
I want <button>
behave like <a>
, with the text at the top left corner of the button.
I'm looking for a WebKit specific fix, maybe there is some -webkit-*
css property that controls this behavior. Hacks are welcome but without using additional markup!
Thank you in advance :)
.button
{
display:inline-block;
height:200px;
border:4px gainsboro outset;
background:silver;
vertical-align:middle;
padding:20px;
box-sizing:border-box;
text-decoration:none;
width:200px;
text-align:left;
}
<button class="button"><button></button>
<a href="http://www.google.com" class="button"><a></a>