1

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.

2 Answers 2

2

This selector should work

.ui-selectmenu-menu li a { *your styling here* }
Sign up to request clarification or add additional context in comments.

2 Comments

This will affect all select menus. Would be great if we could style a specific select menu.
you can add id of selectmenu to css selector. #fakeId.ui-selectmenu-menu li a { your styling here }
0

@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* }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.