0

I have been searching everywhere, but havent found a solution yet.

I need to know how to theme a option list of a select box. In my wordpress site im using this plugin http://wordpress.org/plugins/query-multiple-taxonomies/ .

This plugin creates a dropdown list of taxonomy using "select" and "option" tag.

How do i add my own css to this tag?

Any help would be really appreciated.

aynber
  • 22,380
  • 8
  • 50
  • 63
rahul251
  • 68
  • 1
  • 2
  • 13
  • I'm assuming by "theme" you mean style the select with CSS. First off, selects aren't the simplest things to style, there are limits unless you get into javascript. But I would check this out: http://stackoverflow.com/questions/1895476/how-to-style-a-select-dropdown-with-css-only-without-javascript – Corey Jun 07 '14 at 06:14
  • you'd be better of creating custom select or using some plugins... – T J Jun 07 '14 at 06:16
  • Yea i meant style it. Thanks ill look into the link that you shared. – rahul251 Jun 07 '14 at 06:20

1 Answers1

1

You can style it. Here's the raw sketch I've exctracted:

jsFiddle Example

select has an ID of some-filter and htis field is customized using the some-filter ID in the CSS.

You can, for example, set custom dropdown-arrows, or background, or box-shadow, or anythying you'd like.

However, there are some hacks for Firefox and IE, they are marked in the CSS code. If it hadn' been for them, the default dropdown arrow of the IE and FF would have been displayed.

Play with the fiddle.

knitevision
  • 3,023
  • 6
  • 29
  • 44