Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to apply a css style to a radio button.

843844Mar 15 2007
I cannot seem to persuade jsf to pass css styles through to a radio button.

I have markup like this:
<h:selectOneRadio id="direction" styleClass="largish-form" >
  <f:selectItem id="positive" itemLabel="positive" itemValue="positive" />
  <f:selectItem id="negative" itemLabel="negative" itemValue="negative"  />
</h:selectOneRadio>
Which gets transformed into something like:
<!-- edited for brevity -->
<td>
  <label>
    <input type="radio" name="comp-amount-form:direction" value="positive" class="largish-form" />
    positive
  </label>
</td>
So the style does not get applied to the text of the label. I was expecting something like
<span class="largish-form"> positive</span>.
So how do I get styled labels on my radio buttons?

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 12 2007
Added on Mar 15 2007
0 comments
254 views