I want to know to use CSS in ASP.NET.
If I have set of CSS files and I link my master page to them, how to utilize them to make my application look good. I'm not talking about CSS itself but about how to use its elements in the source of any ASP.NET page.
I'm looking for suggestions, resources, sites, or opinions.
in controls there is a property CssClass
<asp:Button ID="Button1" CssClass="Red" runat="server" Text="Button" OnClientClick='ani();'/>
In addition to @anishmarokey's answer don't forget that all all ASP.NET markup will render as HTML on the browser, so you can do anything that you can do to HTML. This even includes adding attributes such as style
to all elements (even though intellisense will not prompt it). This will render correctly as a HTML style attribute on the client.
In addition CssClass
can only be used on ASP elements, all others will require style
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With