The button below is not aligning with the input. The input has to be on the same height as the button, though the padding of the input seems to have a influence on the alignment! The difference between padding-top and padding-bottom creates this shift of the button.
I made a fiddle: http://jsfiddle.net/3RMhm/10/ to show what I mean.
CSS:
.button {
font-size: 15px;
padding: 9px 23px;
border:0;
}
.form {
width: 290px;
background-color: #F9F9F9;
font-size: 18px;
color: #333;
height: 25px;
border:1px solid darkgray;
padding-top: 15px; <--- This padding
padding-bottom: 0px; <--- And this padding
}
HTML:
<input name="name" class="form" />
<input class="button" type="submit">
Just add vertical-align: middle
to both elements (button and input).
http://jsfiddle.net/3RMhm/3/
Use:
vertical-align:middle;
margin-top: -5px;
http://jsfiddle.net/Hive7/3RMhm/2/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With