Home > HTML > Fix the 1px height difference between input elements
<span><input type="text" /><input type="submit" /></span>

span, input {
    margin: 0;
    padding: 0;
}
span {
    display: inline-block;
    border: 1px solid black;
    height: 25px;
    overflow: hidden;
}
input {
    border: none;
    height: 100%;
}
input[type="submit"] {
    border-left: 1px solid black;
}

References:
http://stackoverflow.com/questions/6557784/persistent-margin-and-1px-height-difference-around-input-elements
http://jsfiddle.net/NGLN/n98SP/1/



Flag Counter