Apr 21 2017 03:38 AM
Hi Everyone,
I am working on custom Master pages in sharepoint 2013. I am trying to create custom master page in visual studio taking a copy of seattle.master. I have created a css file and uploaded the same in Style library.
I have provided the link of this css file in my .master file in visual studio solution in below format.
"<SharePoint:CssRegistration ID="CssRegistration1" Name="<%$SPUrl:~SiteCollection/Style Library/sample.css %>" After="corev15.css" runat="server" />"
sample.css is my css file.
When I add the same css file under Site Settings->Look and Feel->Master Pages->Alternate CSS url. I can see the change .
But once I deploy my solution in visual studio I don't see my changes reflected in my site.Can someone help?
Apr 21 2017 05:10 AM
Is your customer .master page set as default?
Try this in SharePoint Designer:
1. Mark your .master page
2. Check the toolbar "Actions" section for the "Set as Default" option.
3. If it is available, then your .master page is not the default one and you need to use the option.
Kindly inform us of your result :)
John
Apr 21 2017 05:25 AM
Apr 21 2017 06:42 AM
Apr 21 2017 07:45 AM
Your CSS registration tag may contain errors - according to this information, the reference to sitecollection should be lowercase.
Also the way to include the $SPURL need to be different. Please take a look at the link above and try it out :)
John
Apr 21 2017 07:57 AM