How can I control the dropdown visible text position?

I have a dropdown that I want to grow without affecting the text and ensuring that the right hand arrow stays at the full level of the element.

I've tried adding padding, but it affects the right side:

Breakdown with filling http://hoctordesign.com/dropdown2.png

I'm tired of adding height, but I can't vertically align the text:

Breakdown with height http://hoctordesign.com/dropdown.png

Has anyone solved this before?

Thanks, Denis

+2


source to share


2 answers


In your case, it would be better to use a custom element that acts like a select box.

Here is a good one using jQuery



Select block replacement

0


source


This is browser specific behavior. Each browser uses css to manipulate controls differently.



The best breakdown of what you can do (which I came across) is at http://www.456bereastreet.com/archive/200701/styling_form_controls_with_css_revisited/ . And the most relevant section is http://www.456bereastreet.com/lab/styling-form-controls-revisited/select-single/

+2


source







All Articles