Solved

Help Styling ASP RadioButtonList

Posted on 2009-04-13
4
399 Views
Last Modified: 2012-06-21
Hi guys- This seems easy but for some reason I am struggling with this one radio button list. Can't figure out what makes it different from all the others in other pages that use almost identical code. See the attached screenshot. It aligns left. I have tried setting aliggnment in <tr> tag, in <td> tag, is the control itself, and using CSS Class. Can't get it to center. Can anyone tell me what I am missing? Your help would be greatly appreciated.

HTML:
 
                            <tr>
                              
                            <asp:Panel ID="pnlPhoneType" runat="server" Visible="false">
                               <td>
                                    <asp:RadioButtonList ID="rdblPhone" runat="server" RepeatDirection="Horizontal" >
                                    <asp:ListItem>Home</asp:ListItem>
                                    <asp:ListItem Value="Cell"></asp:ListItem>
                                    <asp:ListItem>Work</asp:ListItem>
                                    </asp:RadioButtonList> 
                                </td>
                                <td>
                                    <asp:RequiredFieldValidator ID="rfvrdblPhone" runat="server" ControlToValidate="rdblPhone" ErrorMessage="Please Select The Type Of Phone">*</asp:RequiredFieldValidator>
                                </td>
                            </asp:Panel>
                            </tr>

Open in new window

radioButtonsLeft.jpg
0
Comment
Question by:ksnider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Expert Comment

by:daveamour
ID: 24135506
Can you show me the rendered html of the page?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24137726
"I have tried setting alignment in <tr> tag, in <td> tag"
How did you try setting the alignment values?
0
 
LVL 19

Accepted Solution

by:
daveamour earned 125 total points
ID: 24137760
You have it in the left cell.  Do you just want it over in the second cel ie like this:
                            <asp:Panel ID="pnlPhoneType" runat="server" Visible="false">
                               <td>
                                   &nbsp;
                                </td>
                                <td>
                                    <asp:RadioButtonList ID="rdblPhone" runat="server" RepeatDirection="Horizontal" >
                                    <asp:ListItem>Home</asp:ListItem>
                                    <asp:ListItem Value="Cell"></asp:ListItem>
                                    <asp:ListItem>Work</asp:ListItem>
                                    </asp:RadioButtonList>

                                    <asp:RequiredFieldValidator ID="rfvrdblPhone" runat="server" ControlToValidate="rdblPhone" ErrorMessage="Please Select The Type Of Phone">*</asp:RequiredFieldValidator>
                                </td>
                            </asp:Panel>
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question