Disabling text-wrapping for f:selectItem tags

Reply

Join Date: Mar 2008
Posts: 10
Reputation: mowen85 is an unknown quantity at this point 
Solved Threads: 0
mowen85 mowen85 is offline Offline
Newbie Poster

Disabling text-wrapping for f:selectItem tags

 
0
  #1
Oct 3rd, 2008
The example code below produces two radio buttons, side by side, i.e.
O Keywords O All Fields

Without specifying a width for the selectOneRadio component (which I don't think is the best solution because of user controllable font sizes, etc), "All Fields" wraps across two lines to become:
O All
Fields
... which is a blight on my otherwise neat looking page.

In the code below, does anyone know how to force the space in "All Fields" to be non-breaking or how to style the selectOneRadio or selectItem's so that text-wrapping doesn't occur?

  1. <h:selectOneRadio disabledClass="selectOneRadio_Disabled" enabledClass="selectOneRadio_Enabled" id="radio1" styleClass="selectOneRadio" value="{searchPageBean.searchCriteria.searchOption}" style="vertical-align: middle; margin: 0px; padding: 0px;">
  2. <f:selectItem itemValue="keywords" itemLabel="Keywords"/>
  3. <f:selectItem itemValue="all" itemLabel="All Fields"/>
  4. </h:selectOneRadio>

I've tried, but without success:
- including "text-wrap: none;" and "white-space: nowrap" in the selectOneRadio's style attribute.
- wrapping the selectOneRadio &/or selectItem's in divs styled to have text-wrap set to none.
- replacing "All Fields" with "All&nbsp;Fields", but that just prints the latter.

I know it's a small issue, but any help would be appreciated. Thanks.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC