This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CSS for individual selectItem tag  RSS feed

 
Mee Kar Suu
Greenhorn
Posts: 11
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want every option in selecOnemMenu to be displayed row and column as figure1.

Figure1.
myRadio1 myRadio2
myRadio3 myRadio4



<h:selectOneMenu value="#{user.favCoffee1}">
<f:selectItem itemValue="Cream Latte" itemLabel="Coffee3 - Cream Latte" />
<f:selectItem itemValue="Extreme Mocha" itemLabel="Coffee3 - Extreme Mocha" />
<f:selectItem itemValue="Buena Vista" itemLabel="Coffee3 - Buena Vista" />
<f:selectItem itemValue="Buena" itemLabel="Coffee3 - Buena" />
</h:selectOneMenu>


Can anyone help me out in this.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF renders selectOneMenu as an HTML SELECT and the selectItems as HTML OPTIONs. Although the specs say that you can attach CSS to OPTION elements, I know of absolutely no browsers that actually support that ability. Instead, they use the OPTION elements as data-only definitions without regard to display properties.

As far as 2 or more columns in a SELECT dropdown list, that simply isn't supported in HTML. Some of the JSF extension tagsets can do that, but they do it by generating "fake" HTML and using javascript to manipulate it, since the user's browser can't actually get the right display using basic HTML.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!