Can we add CSS to SharePoint Group Site Template

Krishna 61 Reputation points

Hi ,
We have a SharePoint Online site with Template GROUP#0 i.e. Office 365 Group associated Team Site.
I wanted to add Custom CSS to a Calendar list. I am unable to see Content Editor Webpart or Script Editor webparts.
I have enabled Publishing features as well.
Do you know is there a way to add custom css on top of calendar.

Appreciated your help!

Microsoft Office Online Server
Microsoft Office Online Server
Microsoft on-premises server product that runs Office Online. Previously known as Office Web Apps Server.
478 questions
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
8,069 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,495 questions
0 comments No comments
{count} votes

Accepted answer
  1. Michael 17,971 Reputation points

    Hi @Krishna ,

    You need to allow custom script on your sharepoint site to add Content Editor Webpart or Script Editor webparts. Please refer to this article for more: allow-or-prevent-custom-script

    You can allow custom script on a particular site immediately with the below powershell command:

    Set-SPOsite -DenyAddAndCustomizePages 0  

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

2 additional answers

Sort by: Most helpful
  1. Trevor Seward 11,631 Reputation points

    Manipulating the DOM, thus CSS customizations, are not supported with Modern sites. You would need to otherwise use an SPFx solution but as Microsoft may make changes to the DOM at any time, you shouldn't expect any CSS changes to function indefinitely.

    0 comments No comments

  2. Michael 17,971 Reputation points

    Hi @Krishna ,

    Another workaround is to change the Alternate CSS URL in Master Page. This needs to enable publishing feature.

    1. Upload your css file to a library.

    2. Go to site settings-> Master page, expand the Alternate CSS URL option. Add the reference to your css file.



    Test Result: