1

I'm creating theme to SharePoint Foundation 2013. I'm using custom master page and custom css-file. It was easy to change page background, font colors, etc... So, everything is working on the home page.

However, I want to use this same theme in settings and search page. Some reason my background image is missing and my search page theme is failing.

How I can change settings/search page theme? Or how I can change background image?

Can I use my custom master page or do I have to create new master page or what?

I manage to find these to links: SharePoint Foundation 2013, branding search results page?

http://www.erikminkel.com/2013/08/07/adding-flair-to-your-enterprise-search-page-in-sharepoint-2013/

But even simplest trick didn't work:

.search-background {
  background-color:red;
}

enter image description here

SOLUTION:

This works in SharePoint Foundation:

<asp:literal runat="server" Text="&lt;link href='"/>
            <SharePoint:ProjectProperty Property="SiteUrl" runat="server" />
        <asp:literal runat="server" Text="/Style Library/en-us/CSS/Custom.css' rel='stylesheet' type='text/css'/&gt;"/>

Wrong:

<link rel="stylesheet" href="../../Style Library/en-us/CSS/Custom.css" />

I tried use this and it worked well everywhere else except on site settings and search results.

Wrong (SharePoint Foundation do not support this, works in server):

<SharePoint:CssRegistration ID="CustomCss" name="&lt;% $SPUrl:~sitecollection/Style Library/en-us/CSS/Custom.css %&gt;" runat="server" after="SharepointCssFile" />

You can read more from here: http://blog.blksthl.com/2012/03/27/a-guide-to-branding-and-sharepoint-foundation-part-2/

1
  • Use firebug or similar to see whether or not your custom CSS file is being loaded. Looks like the CSS reference is not correct.
    – Aveenav
    Mar 27, 2014 at 14:46

0

Your Answer

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