cool
cool

Reputation: 143

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:

enter image description here

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.

Upvotes: 0

Views: 1288

Answers (1)

MWelch
MWelch

Reputation: 71

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"

Upvotes: 1

Related Questions