12

I created a custom .css file and dumped it in /Style Library/custom/corev15.css I just created the 'custom' folder and created a duplicate of the original (/_layouts/15/1033/styles/Themable/corev15.css).

After doing that I enabled the "SharePoint Server Publishing Infrastructure" feature under the main site collection features. Then, under "Master Page" I specified the alternate CCS URL using the custom .css that I created. I checked the option "Reset all subsites to inherit this alternate CSS URL" so that all the remaining 38 sub sites within my site collection use the same .css file.

The only changes I made in the custom .css file was to the top navigation menus (no word wrap on the drop-downs, font size, etc.). Am I missing something? The reason I'm asking is because the changes took affect after I checked-in the .css file in SharePoint designer; however, when sub-sites try to add a certain background image or color scheme, the changes that they apply don't show up. There are some that show up partially (see images below):

enter image description here enter image description here Am I supposed to reference this custom CSS any where in the Master file - seattle.html ? If so, where?

1

2 Answers 2

2

SharePoint 2013 by default applies corev15.css to all pages, so you don't need to make a copy and append your styles.

Instead put only your custom CSS into your own corev15.css file and set the link (as you already did).

SharePoint 2013 will then load the default corev15.css and afterwards load your custom one and apply the changes you made.

UPDATE

Just to clarify, you still need a reference to your custom CSS like this:

<!--PS: Start of READ-ONLY PREVIEW (do not modify) --><link href="generalglassintl.sharepoint.com/Style Library/custom/corev15.css" rel="stylesheet" type="text/css"/> and also -> <!--SPM:<SharePoint:CssRegistration Name="/Style Library/custom/corev15.css" runat="server"/>-->

But inside your "/Style Library/custom/corev15.css" you'd only need to put the CSS you want to apply to change the look & feel of the top navigation bar.

7
  • I see. So, I should only include the CSS elements that I want to change in the custom css file... correct? I changed some references in the Master file... <!--PS: Start of READ-ONLY PREVIEW (do not modify) --><link href="generalglassintl.sharepoint.com/Style Library/custom/corev15.css" rel="stylesheet" type="text/css"/> and also -> <!--SPM:<SharePoint:CssRegistration Name="/Style Library/custom/corev15.css" runat="server"/>--> should I have edited those sections?
    – gpapas
    Commented Sep 10, 2014 at 14:58
  • See my updated answer.
    – Sig Weber
    Commented Sep 10, 2014 at 15:06
  • Ok, that makes sense... Thanks for the updated answer.. So, the references you mention should go in as additional html tags within the Master file...correct? they shouldn't replace the ones that are already in place. The reason I'm asking is because, the way it is now is: <link href="/_layouts/15/1033/styles/Themable/corev15.css" rel="stylesheet" type="text/css"/> and <!--SPM:<SharePoint:CssRegistration Name="Themable/corev15.css" runat="server"/>-->
    – gpapas
    Commented Sep 10, 2014 at 16:18
  • Just leave the existing tags as they are and add yours.
    – Sig Weber
    Commented Sep 10, 2014 at 16:22
  • Great, thanks! I'll try it later today and let you know how it went.
    – gpapas
    Commented Sep 10, 2014 at 16:26
18

The above answer is not right. It is totally unnecessary to touch corev15.css.

These are the steps to apply custom CSS to SharePoint site hosted at Office 365.

  1. Find "Site Collection Features" setting and enable all features with name "publishing" in it.
  2. Find "Manage Site Features" setting and enable all feature with name "publishing" in it.
  3. Find "Master Page" setting link under "Look and Feel".
  4. Click "Alternate CSS URL". This is where you apply your own CSS file.
  5. Upload a CSS file to any document library. Ideally to "Style Library".
  6. Go to step 4 and choose your uploaded CSS file.
2
  • Note, when you add the document to the Style Library, be sure to check it in.
    – Yishai
    Commented Nov 16, 2015 at 22:44
  • Couldn't get this to work for me, managed to get master pages etc to show up by adding features however CSS does not seem to apply or even load on page anywhere, any other tips?
    – harri
    Commented Apr 30, 2021 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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