0

I need to register 3 different CSS that are in the 15 hive in the masterpage. I have it in the following format and I checked the link thru IE address bar and they seems to resolve. Why then it's not being effective when I apply the masterpage?

<SharePoint:CssRegistration  ID="Brand1" Name="<% $SPUrl:~SiteCollection/_layouts/15/brand/brand.css%>" runat="server" After="corev15.css" />
<SharePoint:CssRegistration  ID="Brand2" Name="<% $SPUrl:~SiteCollection/_layouts/15/branding/HidePT.css%>" runat="server" After="corev15.css" />
<SharePoint:CssRegistration  ID="Brand3" Name="<% $SPUrl:~SiteCollection/_layouts/15/branding/TitleBGColor.css%>" runat="server" After="corev15.css" />
  • I also tried following way but still no help. I can drop the css using cewp and it works.<SharePoint:CssRegistration ID="Brand4" Name="/_layouts/15/branding/WPTitleColor.css" After="corev15.css" runat="server"/> . Can someone please shed some light? – Kevin Short Nov 12 '15 at 19:42
0

You can use something like this:

<link href="indigo_layout.css" rel="stylesheet" type="text/css" ms-design-css-conversion="no" />

Look at this blog post about "Applying Custom Styles to Page Layouts in SharePoint 2013" it can be directly applied to a masterpage.

0

The following format helps.

<!--SPM:<SharePoint:CssRegistration runat="server" ID="CssRegistration1" Name="&#60;% $SPUrl:~sitecollection/Style Library/style.css %&#62;" After="corev15.css"/>-->

Source: http://yakovenkomax.com/cssregistration-and-scriptlink-done-the-right-way/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.