style select option using css

后端 未结 4 1515
太阳男子
太阳男子 2020-12-17 06:06

I\'m trying to style a select option list using CSS. I want more padding between the times of the list because the seem squashed together. I\'ve tried adding padding to the

4条回答
  •  难免孤独
    2020-12-17 06:11

    If I'm correct, Firefox is the only browser that supports padding, height, margin or any other kind of modification of the size for the option element. (At least Chrome doesn't allow any sort of size altering and you can't ignore Chrome users) so the solutions mentioned above work mostly for Firefox and maybe for some other browsers.

    So your option is to roll your own or use a javascript element library like jquery-ui or twitter bootstrap that are more modifiable.

提交回复
热议问题