Sebastian Nowak
Sebastian Nowak

Reputation: 5717

Reset padding on <select>

I need to set padding on <select> to the same value as the <input type="text" />, so the text in both fields will be aligned to the same vertical line. For testing purposes I've set margin and padding to 0 on both fields, but the text is still indented in the select element. I've also tried changing text-indent, but with no effect. What am I missing?

Here's the demo

Upvotes: 1

Views: 272

Answers (1)

karan3112
karan3112

Reputation: 1867

Try giving text-indent to your input fields.

CSS:

input.edit{ text-indent:4px; }

DEMO

Upvotes: 1

Related Questions