space between radio button and text

I want to put some space between radio button and text in RadioButtonList. Below is my code:

  <asp:RadioButtonList ID="rdbTest" runat="server">
    <asp:ListItem Text="This is test1"></asp:ListItem>
    <asp:ListItem Text="This is test2"></asp:ListItem>
    <asp:ListItem Text="This is test3"></asp:ListItem>
    <asp:ListItem Text="This is test4"></asp:ListItem>
    <asp:ListItem Text="This is test5"></asp:ListItem>
</asp:RadioButtonList>

This is how it looks like:

space between radio button and text

I want to put more spacing between the radio button and "This is test1" , "This is test2" and so on. I have almost 500 radio buttons on my page.

Any help will be appreciated.

here is solutions:

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Solution 1

Add a CSS Class in the header (Adjust the margin value to get desired spacing):

<style>
    .radioBL input[type="radio"]
    {
        margin-right:10px;
    }
</style>

Then add this in your RadioButtonList tag: CssClass="radioBL"

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply