I have the two HTML elements like so:
<input type="text">
and
<select>
<option>Apple</option>
<option>Orange</option>
<option>Banana</option>
<option>Grapes</option>
</select>
I am not at all able to make them the same width. No matter what width I specify for BOTH the elements, 100% or 200px or whatever, the drop down always seems to be about 5px shorter than the text box. This happens in IE, Firefox and Chrome - in WINDOWS.
How can I set them to have the same width?
Solution
input, select
{
-ms-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
-webkit-box-sizing:border-box;
}