• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2048
  • Last Modified:

Orientation of a RadioButtonList in asp.net 3.5 using C#

Hello Experts!!!
I want to orient by radio buttons vertically with each button one over the other and the text to the right of the radio button.  The only way I am aware of to adjust the orientation of the radiobuttons is via RepeatDirection="Vertical".  The problem is this causes the text to be in a vertical orientation as well.  The result is radio buttons oriented vertically with there text description below each button.  In my opinion this looks rather ridiculous however I have not found an alternative way of orienting them.  Does anyone have a better way.  See the attached snippet of code.  Thanks for your help!!!!
<asp:RadioButtonList ID="_SOMEID" runat="server" RepeatDirection="Vertical">
                                    <asp:ListItem Text="Yes" Value="1" Selected="false"></asp:ListItem>
                                    <asp:ListItem Text="No" Value="2" Selected="false"></asp:ListItem>
                                    <asp:ListItem Text="Don't Know" Value="3" Selected="false"></asp:ListItem>
                                </asp:RadioButtonList>

Open in new window

0
SomeGuy892
Asked:
SomeGuy892
  • 4
1 Solution
 
rendaduiyanCommented:
try style:
<asp:RadioButtonList ID="RadioButtonList1" runat="server" style="table-layout: auto; border-collapse: separate" Width="626px">
0
 
Anurag ThakurCommented:
i tried your code snipped and i think i got correct results (not the way you suggested but the way i thought it should come)
the radio buttons were rendered as shown below
 () Yes
 () No
 () Don't Know

let us know if you still face any problems - Ragi
0
 
SomeGuy892Author Commented:
Ok it has been a while since i have had the opportunity to take a look at this again and Ragi you are right the code snippet that I provided doesn't reproduce the issue.  The problem seems to come from the Masterpage.  I didn't create this masterpage and I am trying to get an idea of where to start looking any ideas?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
SomeGuy892Author Commented:
Even closer still it is in the stylesheet inherited via the Masterpage.  Still looking let me know if you have any thoughts.
0
 
SomeGuy892Author Commented:
Ok I have found the specific line of code in the stylesheet that is my problem.  I am going to close this question out and will start a followup question.
0
 
SomeGuy892Author Commented:
You didn't provide the complete answer to my problem but you did call me out on the issue not being present in my sample code snippet which was corrected and pointed me in the right direction.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now