2012-03-01 59 views
2

我有一个页面,其中使用了位于HTML表格中的RadiobuttonList。我给出了表格td的CSS样式。我也给了一个CSS风格RadioButtonList,但它不采取它的风格RadioButtonList - 它从td。有什么办法可以让RadioButtonList遵循的风格RadioButtonList而不是td将CSS STYLE设置为RadioButtonList

+0

提供一个例子,一些代码,请。 – Zeta 2012-03-01 19:40:59

+0

您能否指定您正在申请哪些样式,哪些样式不适用? – yoozer8 2012-03-01 19:45:29

+2

什么是RadioButtonList? – 2012-03-01 19:46:03

回答

0

在多个浏览器中设置单选按钮,复选框和选择一致性非常困难。你最好的选择是尝试使用这个jQuery插件 - Fancy Checkboxes

0

通过CSS设置单选按钮的风格是有限的。它们的外观因浏览器和操作系统而异。除非您想用脚本版本替换它们,否则最好让它们保持独立。

1

我假设你谈论造型asp:RadioButtonList

添加的CssClass您asp:RadioButtonList并定义它在你的CSS

<asp:RadioButtonList runat="server" CssClass="radiobuttonlist"> 
    <asp:ListItem Text="Item1" Value="1"></asp:ListItem> 
    <asp:ListItem Text="Item2" Value="2"></asp:ListItem> 
    <asp:ListItem Text="Item3" Value="3"></asp:ListItem> 
</asp:RadioButtonList> 

CSS

.radiobuttonlist     { } 
.radiobuttonlist tr     { } 
.radiobuttonlist tr td    { } 
.radiobuttonlist tr td input  { } 
.radiobuttonlist tr td label  { }