How can I apply CSS to a Web Content Form that is using a MasterPage?
I can't apply Class="" anywhere. :S Any help?
How can I apply CSS to a Web Content Form that is using a MasterPage?
I can't apply Class="" anywhere. :S Any help?
Why can't you?
CSS works in content pages the smae way it works in regular pages.
If you're actually asking how to add CSS rules for the content page, you need to add a placeholder in the HEAD
element in the master page, then add CSS rules or files to that placeholder in the content page.
in Web Controls the attribute is CssClass and not Class as it is in HTML Controls
<style type="css/text">
.myClass { font-size: x-large; }
</style>
then
<asp:Label ID="myLabel" runat="server"
CssClass="myClass" Text="This is a WebControl Label" />
as opposed to:
<span class="myClass">This is a HTML Lable</span>
I've never had an issue with this. If it's not rendering, then make sure your path to your CSS file is correct.
Be sure you stylesheet is referenced properly in your web content form.
<link id="link1" rel="stylesheet" href="myStyleSheet.css" type="text/css" runat="server" />