CSS: how to center input inside a div

I have some problem trying to center vertically the input inside a div. I tried so many hours with different positions, fields, alignment, etc.

Some information about the code: Website: http://goo.gl/bDjv8C Section: contact (last, below)

I'm trying to center the input "your email address", but when you zoom in / out (or use different devices, such as smartphones), the position is not exactly the same> _ <

At first, I had only the entrance and the OK button on the right, but both of them were never vertically centered (sometimes OK went up, sometimes down ...). So I tried to make a div with a black background and them inside to hide the gap between the two inputs, but it got worse: s

Does anyone have an idea?

PS: this is not a problem with horizontal alignment, but vertical.

+5
source share
1 answer

the answer is string-height in css check this script http://jsfiddle.net/elviz/qvzk1eoj/1/

.sample{ height: 50px; background-color: red; line-height: 50px; } 
+4
source

All Articles