jsfjsf-2whitespaceselectoneradio

Add space between the radio button and lable in h:selectOneRadio and f:selectItems


I am using jsf2 with primefaces.

 h:selectOneRadio
               f:selectItems 
h:selectOneRadio

This produces a radio button and the input label inside the same td such as

<td>
   <input type=radio> </input>
   label 
</td>

My problem is I need to add space between the radio button and the label. (X)C121 Active (X)LRM

In the above radio button list I need to add space such as

(x)    <---Space-->  C121 Active
(x)    <--Space -->  LRM

What is the best way I can add space for this ? Need help. Sorry as I am new for JSF I could not figure-out a solution. P.S (x) represents a radio button Radio button and the label

Tech Stack : JSF 2.0, Spring 3.x , Hibernate 4.x.


Solution

  • I think some styling like this would be appropriate:

    input[type=radio]{
        margin-right: 7px;
    }
    

    Put it in <style>-tag in h:head or better yet in an external css-file you include with h:outputStylesheet.

    This way, you'll target them all without further code.