Solved

Help Styling ASP RadioButtonList

Posted on 2009-04-13
4
392 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
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
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)

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now