开发者

Radio Button List Layout ASP .Net [closed]

开发者 https://www.devze.com 2023-03-23 21:20 出处:网络
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
开发者_开发知识库

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 question

I'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;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消