css - How to style an asp control without using a separate CSSClass? -
i'm beginner in css , need set style asp:labels
got in page. can html label
control:
label { color:red; } <label id="mylabel" runat="server">my text</label>
but doesn't work asp:label
control.
i find online can adding cssclass
attribute each asp:label
control , set attributes of cssclass
@ top of page.
.myclass { color:red; } <asp:label id="mylabel" runat="server" cssclass="myclass">test</asp:label>
but way i'll have go through asp:label
controls , give them cssclass="myclass"
. there way style asp:labels
in same way styled html labels above?
the asp label
renders span
tag. try give style span
tag.
label, span { color:red; }
Comments
Post a Comment