nate
nate

Reputation: 1428

Raido button list text will not align to the right all the way ASP.NET C#

I have a radio button list in my ASP.NET project. I have the properties set for the RepeatDirection = Horizontal, RepeatLayout = Table, and the TextAlign = Right. This is how my control looks:

Radio Button List

Here is the code for the radio button list:

<asp:RadioButtonList ID="RadioButtonList1" runat="server" Font-Size="X-Small" RepeatDirection="Horizontal">
                                    <asp:ListItem>Lumber</asp:ListItem>
                                    <asp:ListItem>Sheathing</asp:ListItem>
                                    <asp:ListItem>Beam</asp:ListItem>
                                </asp:RadioButtonList>

The horizontal part is right, but I want the text to be to the right of the radio button, and not under it. Is there property, or something that I can do in the codebehind to make this happen?

Upvotes: 2

Views: 1329

Answers (2)

Claudio Redi
Claudio Redi

Reputation: 68440

It might be possible that you have a css class setting display block for the labels. Use browser developer tools to inspect style settings.

Upvotes: 2

SpiderCode
SpiderCode

Reputation: 10122

The problem with your design is that the div tag in which your RadioButtonList besides is having not enough width.

In order to resolve your problem increase the width of the parent tag in which your RadioButtonList besides. That will solve your problem.

Upvotes: 0

Related Questions