1

I have added a link to a custom CSS file to my master page to change the width of the navigation sub menu, but it doesn't take affect when I browse to a subsite in the site collection

How can I apply the custom CSS to all the subsides in the site collection?

This is the code I added to the master page to add the custom css file

<!--SPM:<SharePoint:CssRegistration Name="/_catalogs/masterpage/Style Library/Custom.css" runat="server" after="corev15.css"/>-->

This is the root Site which is what I want it to look like across all subsites

enter image description here

This is what it looks like on subsites

enter image description here

How do make all subsites use the custom style sheet without having to edit the master page for ALL subsites?

Thanks

3

If your site is publishing site follow the mentioned steps below: Upload the CSS file to your style library then Go to Site Settings > Look and Feel > Design Manager > Publish and Apply design > Specify the path of CSS enter image description here

  • I have found the section do I just add a link tot he CSS file? – Matt Saunders Jul 12 '16 at 10:45
  • You can also apply the above-mentioned method by activating the publishing features in site features then assign CSS and deactivate publishing feature again – Mohamed El-Qassas MVP Jul 12 '16 at 10:52
  • I tried add the <link rel="stylesheet" type="text/css" href="custom.css"> into the All Channels box, it shows the menu correctly at the root site but not the subsites – Matt Saunders Jul 12 '16 at 10:55
  • 2
    I have it working now, I entered the link to the stylesheet /_catalogs/masterpage/Style Library/Custom.css and then I had to check the box "Reset all subsides to inherit this alternate CSS URL" – Matt Saunders Jul 12 '16 at 10:59
1

Did you tried using the $SPUrl:~SiteCollection, you can specify a parameter which will return the current site collection

<!--SPM:<SharePoint:CssRegistration name="&lt;% $SPUrl:~sitecollection/_catalogs/masterpage/Style Library/Custom.css %&gt;" runat="server"  />-->
0

Microsoft is working on all sort of changes in preparation for the new SharePoint Framework model (most likely to be released @ Ignite in september)

Currently (July 12 2016)

  • MasterPages are not applied to the New Document Library Experience and the New Site Contents Page
  • There is no way of adding branding to these New Experience pages
  • There is no way of adding script (not even UserCustomActions) to these New Experience pages

Suggestion from Microsoft is to switch back to Classic View if you want your branding

"Cloud Software" is like that Paula Abdul .. "Two steps forward, one step back"

The place to be updated about new branding/front-end developments is Microsofts ITPro Yammer groups: https://www.yammer.com/itpronetwork/#/threads/inGroup?type=in_group&feedId=4597220&view=unviewed

  • HI Thanks for the reply but this is nothing to do with the document library experience, I am trying to apply CSS styling from the root site to all subsites in my site collection – Matt Saunders Jul 12 '16 at 10:21
  • Just explaining why you won't see any branding options (yet) in New Experiences DocLibs and SiteContents on O365 – Danny '365CSI' Engelman Jul 12 '16 at 11:21

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.