Radio Button List Layout ASP .Net [closed]
开发者_开发知识库
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 9 years ago.
Improve this questionI'm having trouble achieving desired layout for radiobuttonlist. I want the output to look like the image below.
Here is a link to what I'm trying to achieve:
http://skitch.com/hiraldesai/fcfn9/radio-button-layout
Here is my code trying to achieve the above, but I am not able to get the text above the radio button programmatically. Is it a CSS thing? I have tried many different combinations of RepeatLayout, RepeatDirection, RepeatColumns, TextAlign, etc.
AnswerRadioButtons.RepeatLayout = RepeatLayout.Table
AnswerRadioButtons.RepeatDirection = RepeatDirection.Horizontal
Thanks for advising.
I was able to do it with this test.
<asp:RadioButtonList ID="rbl" runat="server" RepeatDirection="Horizontal"
RepeatLayout="Table" CssClass="RBL" TextAlign="Left">
<asp:ListItem Text="radio button 1" />
<asp:ListItem Text="radio button 1" />
<asp:ListItem Text="radio button 1" />
</asp:RadioButtonList>
With this css
.RBL label
{
display: block;
}
.RBL td
{
text-align: center;
width: 20px;
}
精彩评论