So I have a radio button with the text "Yes" and "No" and if any of them is selected I want the font color to change.
The following is the html code:
<asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal"> <asp:ListItem Text="否" Value="False" /> <asp:ListItem Text="是" Value="True" /> </asp:RadioButtonList>
I have the following code in css that changes the label of the selected radio button:
input[type="radio"]:checked label { Font weight: bold! important; }
You can use block brackets to locate any property, including the "Text" property: