Search code examples
c#asp.netradio-buttonradiobuttonlisttext-align

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?


Solution

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