+ Start a Discussion
Mhlangano KhumaloMhlangano Khumalo 

How to add multiple lines withing a single label <apex:selectOption itemLabel=" "> in Visualforce

I want the radio buttons to look like the image below. below is my code.
I want the  radio buttons to look like this 
Currently they look like this
 
 User-added image

below is my code, please help.
<apex:selectRadio value="{!Object__c.Field__c}"  layout="pageDirection"  >
      <apex:selectOption itemLabel="USA <br/> New york <br/> Chicago" itemValue="USA" itemEscaped="false" />
      <apex:selectOption itemLabel="Japan <br/> Osaka <br/> Tokyo"  itemValue="Japan" itemEscaped="false" />       </apex:selectRadio>
Amit Chaudhary 8Amit Chaudhary 8
Please try to use picklist value


<apex:selectList id="chooseColor" value="{!string}" size="1">
<apex:selectOption itemValue="red" itemLabel="Red"/>
<apex:selectOption itemValue="white" itemLabel="White"/>
<apex:selectOption itemValue="blue" itemLabel="Blue"/>
</apex:selectList>
 
Mhlangano KhumaloMhlangano Khumalo
Has to be a radio button not field
@Amit Chaudhary 8 , the options look like the above snapshot if they are a list. They have to be radio buttons. 
Amit Chaudhary 8Amit Chaudhary 8
<apex:selectList id="chooseColor" value="{!string}" size="1">
<apex:selectOption itemValue="USA" itemLabel="USA"/>
<apex:selectOption itemValue="New york" itemLabel="New york"/>
<apex:selectOption itemValue="blue" itemLabel="Chicago"/>
</apex:selectList>


<apex:selectList id="chooseColor" value="{!string}" size="1">
<apex:selectOption itemValue="Japan" itemLabel="Japan"/>
<apex:selectOption itemValue="Osaka" itemLabel="Osaka"/>
<apex:selectOption itemValue="Tokyo" itemLabel="Tokyo"/>
</apex:selectList>

Please try  above two picklist
Mhlangano KhumaloMhlangano Khumalo
I dont want to change it to selecList, my problem is if the sentence is too, it starts below the radio button, it if its short, its fine. Hence im asking how to list options within ItemLabel, I want to <br/> without options being displayed like the 2nd image on my question.

 User-added image