Daniel Van Der Werken
asked on
ASP:RadioButtonList Control Formatting Button Text Align Word-Wrap
I have an asp .net radiobuttonlist control -- works great except I'd like to wrap the text as if I were using individual asp .net radiobutton controls rather than a button list.
The RadioButton usage includes a definition for a radiobutton *and* a separate label. If you do this, then you get the desired result:
O Here is some text that then wraps and ends up
wrapped such that the second line of text and so-
forth ends up aligned under where the label is defined.
Here is the RadioButton code:
<asp:RadioButton ID="_rb01" GroupName="Answers" runat="server" />
<asp:Label id="_lbl01" runat="server" />
The code-behind fills it but that's not important.
Here's how the radiobuttonlist works:
<asp:RadioButtonList id="_rbList" runat="server" />
The code-behind fills this and we get the results as:
O Here is the text for the radio button list. We didn't use a lable
but instead we simply added the text as an item to the radiobutton-
list in the ccde-behind and note that instead of having the text aligned
with the "H" in "Here" above, it aligns with where the radiobutton starts.
The desired result would be:
O Here is the text for the radio button list. We didn't use a lable
but instead we simply added the text as an item to the radiobutton-
list in the ccde-behind and note that instead of having the text aligned
with the "H" in "Here" above, it aligns with where the radiobutton starts.
Any ideas on how I can get this accomplished? Some way to add a style-sheet to the buttonlist or anything? I know I can add a stylesheet with _rbList.Attributes.Add( "class", "cssClassName" ); etc.
Thanks!
---Dan---
The RadioButton usage includes a definition for a radiobutton *and* a separate label. If you do this, then you get the desired result:
O Here is some text that then wraps and ends up
wrapped such that the second line of text and so-
forth ends up aligned under where the label is defined.
Here is the RadioButton code:
<asp:RadioButton ID="_rb01" GroupName="Answers" runat="server" />
<asp:Label id="_lbl01" runat="server" />
The code-behind fills it but that's not important.
Here's how the radiobuttonlist works:
<asp:RadioButtonList id="_rbList" runat="server" />
The code-behind fills this and we get the results as:
O Here is the text for the radio button list. We didn't use a lable
but instead we simply added the text as an item to the radiobutton-
list in the ccde-behind and note that instead of having the text aligned
with the "H" in "Here" above, it aligns with where the radiobutton starts.
The desired result would be:
O Here is the text for the radio button list. We didn't use a lable
but instead we simply added the text as an item to the radiobutton-
list in the ccde-behind and note that instead of having the text aligned
with the "H" in "Here" above, it aligns with where the radiobutton starts.
Any ideas on how I can get this accomplished? Some way to add a style-sheet to the buttonlist or anything? I know I can add a stylesheet with _rbList.Attributes.Add( "class", "cssClassName" ); etc.
Thanks!
---Dan---
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.