Mayur
Mayur

Reputation: 3097

Give spacing between text and radio in ASP

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" />

Upvotes: 8

Views: 18925

Answers (4)

Simpa
Simpa

Reputation: 151

Another method that works is to precede the text property of the radiobutton with the &nbsp; symbol like this Text="&nbsp; I have pad before me"

Upvotes: 3

ladeangel
ladeangel

Reputation: 261

Use CSS:

input[type="radio"] 
{
    margin-right: 2px;
}

Or:

input[type="radio"] + label
{
    margin-left: 2px;
}

Upvotes: 7

Stefanvds
Stefanvds

Reputation: 5916

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

Upvotes: 1

Lasse Espeholt
Lasse Espeholt

Reputation: 17792

Try:

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

and CSS:

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

works here...

Upvotes: 12

Related Questions