views:

19

answers:

2

Hi,

How can I give spacing between Radio Button and Text using Asp:RadioButton control in ASP.NET?

<asp:RadioButton ID="radio1" runat="server" GroupName="Group1" />
+1  A: 

Try:

<asp:RadioButton ID="radio1" CssClass="Space" runat="server" GroupName="Group1" />

and CSS:

.Space label
{
   margin-left: 20px;
}

works here...

lasseespeholt
+1  A: 

where is your text? use a label for the radiobutton or put some margin in CSS around the button.

Stefanvds
Asp.Net already creates a `label` html tag for `RadioButton`
lasseespeholt
seem to be using MVC for too long :) the answer is css anyway :)
Stefanvds