Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Help Styling ASP RadioButtonList

Posted on 2009-04-13
4
Medium Priority
?
401 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
  • 2
3 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

772 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