function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Displaying multi radio buttons horizontally

Hi All,

Can anyone help me out in alligning the multi radio buttons horizontally?

User-added image
Ajay K DubediAjay K Dubedi
you can do it by attribute Layout and set its value "lineDirection"
<apex:selectRadio value="{!mySelectedRadio}" layout="lineDirection"> 
    <apex:selectRadio itemValue="1" itemLabel="1" />
                <!-- other options --> 
Hi Ajay,

Thanks for your help
But the above code snippet didnt make any difference upon adding to the existing code.

Also,couldnt find the attribute itemvalue for <apex:selectRadio> tag.
Ajay K DubediAjay K Dubedi
 try this code it may help you....
<apex:page >
<apex:form >

<apex:selectRadio id="one" layout="lineDirection">
          <apex:selectOption itemValue="One" itemLabel="one"></apex:selectOption>
          <apex:selectOption itemValue="Two" itemLabel="two"></apex:selectOption>
          <apex:selectOption itemValue="Three" itemLabel="three"></apex:selectOption>         
Thanks .