wwwroth
wwwroth

Reputation: 434

CSS styling jQuery's 'selectmenu' plugin

Selectmenu: https://github.com/fnagel/jquery-ui/wiki/Selectmenu

I'm using this plugin to style a select menu on a widget I'm building. I have all the functionality working correctly but I can't seem to style the list items it generates. The text is wrapped inside an anchor tag inside the #wrap div it creates at the bottom of the page.

Upvotes: 1

Views: 5974

Answers (2)

Aryeh Armon
Aryeh Armon

Reputation: 2175

@smegger's answer shows how to style all drop downs. If you want to style a specific one it will not work to wrap the select with a given class since the dropdown html is created right above the closing body tag. Therefor you need to add an ID attribute to the select tag

<select id="some_id" name="some_name">...options...</select>

This will create the ul dropdown html tag with an ID of 'some_id-menu'

In order to style it just use:

#some_id-menu li a { *your styling here* }

Upvotes: 0

Smegger
Smegger

Reputation: 1008

This selector should work

.ui-selectmenu-menu li a { *your styling here* }

Upvotes: 2

Related Questions