Forum Moderators: open

Message Too Old, No Replies

Simple Form Checkbox Formatting Question

Align wrapped text next to single checkbox

         

cascade

7:03 pm on Oct 23, 2009 (gmt 0)

10+ Year Member



I’ve been thrown into resolving a formatting issue on an ASP form and I have extremely limited ASP knowledge. I have a single checkbox that contains a label that is long and needs to wrap to the second line. The 2nd line does not align with the text above and instead is positioned below the checkbox.

To clarify, the current result is as follows:

[ ] Yes I would like to sign up
for a demo of your product

Desired result would be for the “F” in “for” to align with the “Y” in “Yes” above.

Current code for the checkbox is as follows:

<asp:CheckBox ID="WantsDemo" Text="Yes I would like to sign up for a demo of your product " runat="server" />

I know how to do this in HTML, but am lost when it comes to manipulating the Text attribute in ASP. Can somebody please advise this lost ASP newbie? Thanks

Ocean10000

9:22 pm on Oct 23, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You could just do something like this.

<table>
<tr>
<td><asp:CheckBox ID="WantsDemo" Text="" runat="server" /></td>
<td>Yes I would like to sign up for a demo of your product</td>
</tr>
</table>