Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Help Styling ASP RadioButtonList

Posted on 2009-04-13
4
Medium Priority
?
400 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 500 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

Independent Software Vendors: 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!

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

688 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