I have an input element that has a height that is 2px greater than expected.
Below is the css
.input {
font-size: 16px;
padding: 15px;
border: 1px solid black;
border-radius: 3px;
width: 400px;
}
<input class="input">
I would have expected the content height of the input to be 16px due to the font size. For some reason Chrome says my content box is 18px rather than 16px. I even tried to set line-height: 1
but did not work. Can someone explain this? I'd rather not hard code the height as a solution.