Best way to keep text input, button and div all the same height

Hi,

Code @ http://jsfiddle.net/qwj3sz4r/

Trying to get the text input, the button and div all the same height.

Tried line height, font-size and height and none seam to woork conistantly across the browsers.

Is there a method that is generally the best?

First, it’s a good idea to always add the following as this removes the need for you to clear paddings, borders, etc:

*, *:before, *:after{box-sizing: border-box;}

Then, just set the heights. You may notice that one or more of the inline elements seem offset by a pixel or so. For those, you’ll need to add vertical-align: top;

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.