Select inputs and text inputs in HTML – Best way to make equal width?

The solution is to specify box model for form elements, and browsers tend to agree most when you use border-box:

input, select, textarea {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}

There’s normalize.css project that aggregates such tricks.

Leave a Comment