Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm very new to Sharepoint programming so I appologize if my question sounds stupid.

How can I add a custom css stylesheet to my site's pages? Are there any free tools to help me customize my site and site elements like lists - to add css rules for a view for example?

I am working with an on-premises Sharepoint server running on Windows Server 2012.

Thank you in advance!

share|improve this question

2 Answers 2

up vote -1 down vote accepted

this should be done using Visual Studio 2012-2013 or you can hack at it using SharePoint Designer.

I am currently doing the hacking part and believe me if i had the time i would go back and do it the visual studio way.

When adding CSS to any aspx page ensure you use:

If you want to apply CSS styles to a page layout per device channel use the below:

--> --> -->

<link rel="stylesheet" type="text/css" href="MyStyleSheet.css" ms-design-css-conversion="no" />
    <!--ME:</Publishing:DeviceChannelPanel>-->
    <!--CE: End Device Channel Panel Snippet-->

</div><div data-name="DeviceChannelPanel">
    <!--CS: Start Device Channel Panel Snippet-->
    <!--SPM:<%@Register Tagprefix="Publishing" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=15.0.0.0, Culture=neutral,      PublicKeyToken=71e9bce111e9429c"%>-->
    <!--MS:<Publishing:DeviceChannelPanel runat="server" IncludedChannels="Channel2">-->

    <link rel="stylesheet" type="text/css" href="CSS5.css" />
     <!--ME:</Publishing:DeviceChannelPanel>-->
     <!--CE: End Device Channel Panel Snippet-->
</div>
share|improve this answer
    
I don't understand this post actually, is it possible there's code missing? –  Christoffel de Gruyter Aug 18 at 12:25
    
Yes code is missing, use this page as a reference msdn.microsoft.com/en-us/library/office/… –  Csharper Aug 18 at 12:38
1  
Using Visual Studio just to add CSS to a SharePoint page is probably an extreme case of overkill... especially for simple scenarios or newer SP users. There are probably 10 ways to accomplish this without VS, all of which are easier to implement, and some of which provide just as robust results across different sites/webs/tenants –  John-M Aug 18 at 12:55

Well, since version 2013, SharePoint has implemented a new feature called the Design Manager to make it easier for people who have no experience with SharePoint to implement their own custom styles. You enable the Design Manager by enable the publishing feature.

To enable the design manager follow the next steps:

  1. Click on the gear icon in the top right and click "Site settings"
  2. In the next page, under "Site Collection Administration" click "Site collection features"
  3. Find "SharePoint Server Publishing Infrastructure" and click "Activate"
  4. Go back to the previous page (Site settings) and go to "Manage site features" under "Site Actions"
  5. Find "SharePoint Server Publishing" and click "Activate"

After you've followed these steps, click on the gear icon again in the top right and you should a new option called the "Design Manager", when you click this you will go through a process that takes you through the various SharePoint design options available to you. It is it's own step by step guide for teaching people like yourself the basics. Make sure you follow each step carefully and make sure you follow the tutorials on each page.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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