HTML Dropdown and Textbox with custom border different widths
I have a dropdown box and a text box.
I searched this site but could not find the answer for my problem.
I have the following styles applied to each, but the dropdown is significantly shorter than the textbox due to the custom border.
border: 1px solid #E05206;
border-radius: 5px 5px 5p开发者_StackOverflowx 5px;
font-size: 1.2em;
padding: 0 5px;
width: 335px;
Does anyone know of a fix for this for all browsers, each browser has a different length.
Thanks in advanced.
Add div with fixed width put your control inside it and change width in your css to 100%
that should resolve your problem.
Worked it out, is the way padding is added to the dropdown, the padding increases the overall width of the textbox, but does not do the same to the dropdown.
精彩评论