Give spacing between text and radio in ASP
Asked Answered
P

4

8

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" />
Passional answered 20/8, 2010 at 10:15 Comment(0)
F
12

Try:

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

and CSS:

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

works here...

Fundus answered 20/8, 2010 at 10:18 Comment(0)
B
7

Use CSS:

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

Or:

input[type="radio"] + label
{
    margin-left: 2px;
}
Bilingual answered 30/10, 2013 at 15:26 Comment(0)
C
3

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"

Camilacamile answered 17/11, 2015 at 9:5 Comment(1)
That works perfectly! Also, the semicolon and the space after it aren't necessary, just put &nbsp where you want it and there it will be!Nutriment
O
1

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

Oxidate answered 20/8, 2010 at 10:18 Comment(1)
seem to be using MVC for too long :) the answer is css anyway :)Oxidate

© 2022 - 2024 — McMap. All rights reserved.