Read more

When I give a button and a link the same styles, why is the link one pixel higher?

Henning Koch
May 10, 2012Software engineer at makandra GmbH

It's not logical, so don't be too hard on yourself. You need to give it a height and change the box-sizing and display:

button
input[type="reset"],
input[type="button"],
input[type="submit"],
input[type="file"] > input[type="button"]
  display: inline-block
  box-sizing: border-box
  height: 20px
  line-height: 20px
Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

Also see Proper cross-browser CSS styling for buttons.

Posted by Henning Koch to makandra dev (2012-05-10 13:25)