css « Tag « JSF Q&A





1. How can I apply CSS to a JSF tag?    stackoverflow.com

I want to apply CSS specific to selectItem in selectOneMenu to be displayed in a different style. e.g. I want every option of coffee in the list below to be displayed ...

2. CSS for JSF tags    coderanch.com

4. CSS for individual selectItem tag    coderanch.com

Sorry, no can do. selectItem is part of the "f:" (facet) tagset and therefore does not correspond to UI display elements - it's data. A bigger problem is that the h:selectOneMenu tag renders as an HTML SELECT tag, and the HTML select tag (and the OPTION tags that the facets generate) don't support per-item styling. You CAN achieve this kind of ...