I want to add padding to the options of html "select" tag.
I try to add it in the style property of "select" and "option" and it doesn't work in IE.
What can I do?
The width is to allow enough room in the displayed select box when not active, the margin does what it always does, text-indent is used to feign padding between the left boundary of the select box and the inner-text. line-height is just to allow vertical spacing.
When you want to add space around an HTML element's content then you'll use the padding properties. The padding shorthand property allows us to set the padding on all four sides at once instead writing out padding-top , padding-right , padding-bottom , padding-left .
OK, I hate to sound all 1990s, but would simply pre- and app-ending a space to the option text be acceptable for your desired goals?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With