show dynamic text in the radio button

Hello Experts,

I am assigning text to the radio buttons dynamically, its showing them fine however i am unable  to adjust its alignment.

I mean, if the text is more its showing it in the next line and starting from its full left, all I wanted is to align the second line text with the first, so that text for the both lines start from the same place.

I hope you understand what I am trying to say you here?

Please can someone advise?

Thanks
kay

<asp:RadioButtonList ID="rdoMultipleOptions" runat="server"></asp:RadioButtonList>&nbsp;
 ====================================================================
 
 Dim MultipleOptions As Integer
            rdoMultipleOptions.Items.Clear()
            For MultipleOptions = 0 To 3 Step 1
                rdoMultipleOptions.Items.Add(DV(MultipleOptions)("Option").ToString())
            Next

Open in new window

learningnetAsked:
Who is Participating?
 
JorisWConnect With a Mentor Commented:
Try this:

#rdoMultipleOptions input {
  float: left;
}

#rdoMultipleOptions label {
  display: block;
  margin-left: 1.5em;
}

0
 
learningnetAuthor Commented:
hello JorisW,

thanks for your help. that seems to have worked if the text continues in the next line.

for those who have lless text appearing in the next line

if you please see the attached

thanks
 
screen1.jpg
screen2.jpg
0
 
JorisWCommented:
Are you sure there is not a <br> before "Chan"? (probably just a simple newline in asp).

Could you post the (html) source code of the problem (or just provide a link). Also, what is wrong in the second screenshot?
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
learningnetAuthor Commented:
hi jorisw,
i am sorry i dont have any live link for you to show, i am doing locally on my PC at the moment.

i am pulling data from the database and assigning to the radiobutton and there is no <br> getting added...

i am not sure why is it behaving like this...

there is no problem in screen2, that was only to show you i am having no problem in the longer text, its now only if i have less text, please see the attached


<table id="rdoMultipleOptions" border="0">
		<tr>
			<td><input id="rdoMultipleOptions_0" type="radio" name="rdoMultipleOptions" value="Cocoa powder it contains" /><label for="rdoMultipleOptions_0">Cocoa powder it contains</label></td>
		</tr><tr>
			<td><input id="rdoMultipleOptions_1" type="radio" name="rdoMultipleOptions" value="Cocoa solids it contains" /><label for="rdoMultipleOptions_1">Cocoa solids it contains</label></td>
		</tr><tr>
 
			<td><input id="rdoMultipleOptions_2" type="radio" name="rdoMultipleOptions" value="Cocoa beans it contains" /><label for="rdoMultipleOptions_2">Cocoa beans it contains</label></td>
		</tr><tr>
			<td><input id="rdoMultipleOptions_3" type="radio" name="rdoMultipleOptions" value="Cocoa butter it contains" /><label for="rdoMultipleOptions_3">Cocoa butter it contains</label></td>
		</tr>
	</table>

Open in new window

screen3.jpg
0
 
learningnetAuthor Commented:
if i do not apply any styles for the label then the same one liner is coming up ok but the 2 liners are breaking


 <style>
    #rdoMultipleOptions input {
  float: left;
}

<%--#rdoMultipleOptions label {
  display: block;
  margin-left: 1.5em;
}--%>
    </style>
screen4.jpg
0
 
learningnetAuthor Commented:
please have the markup attached


<table border="0" id="rdoMultipleOptions">
		<tbody><tr>
			<td><input type="radio" value="It  enables your body to burn calories" name="rdoMultipleOptions" id="rdoMultipleOptions_0"/><label for="rdoMultipleOptions_0">It  enables your body to burn calories</label></td>
		</tr><tr>
			<td><input type="radio" value="It encourages deep breathing" name="rdoMultipleOptions" id="rdoMultipleOptions_1"/><label for="rdoMultipleOptions_1">It encourages deep breathing</label></td>
		</tr><tr>
			<td><input type="radio" value="It allows the brain and body essential time to replenish itself, preventing fatigue" name="rdoMultipleOptions" id="rdoMultipleOptions_2"/><label for="rdoMultipleOptions_2">It allows the brain and body essential time to replenish itself, preventing fatigue</label></td>
		</tr><tr>
			<td><input type="radio" value="It prevents a build up of energy" name="rdoMultipleOptions" id="rdoMultipleOptions_3"/><label for="rdoMultipleOptions_3">It prevents a build up of energy</label></td>
		</tr>
	</tbody></table>

Open in new window

0
 
JorisWCommented:
mmm I still cant recreate the problem. Could you perhaps save the page and attach it?
0
 
learningnetAuthor Commented:
hello jorisw,

i have tried but i think you may not be able to reproduce the problem even i attached the markup ..

please is it possible for you to access my PC remotely?

www.logmein.com--> you dont have to install anything on your PC and u may use the browser to access

www.teamviewer.com --> small software which you can install and get connected, free and fast !

please can you let me know?  you may write me here niidmore@yahoo.com i will provide you the access details...

your help will greatly be appciated as i am completely stuck with it..

thanks
0
 
JorisWCommented:
Wouldn't it be easier for you if you open port 80 temporarily, tell me your IP so I could just visit your web server?
0
 
learningnetAuthor Commented:
hi
unfortunately i dont know how to open port 80 and its my development local PC so i dont know whether i could even do that?

logmein is quick, please let me know..

thanks
0
 
JorisWCommented:
I mailed you my address
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.