Forum Discussion

Dhiran Gajjar's avatar
Dhiran Gajjar
Iron Contributor
Jun 23, 2017

Adding CSS to Office365 Group sites

Hi,

 

I would like to add some simple CSS that works on regular SharePoint site which allows promoted links to wrap around and hide the navigation bar. 

 

On a regular SharePoint site this could be added using the script editor webpart. As this doesnt exist in Office365 group site, I thought I would use the embed code option and add the code that way. 

 

After saving the page, the code is stripped out and only the style tags remain. 

 

Any ideas why?

 

Dhiran

  • I have seen a option that is to change the colors i thought you can not change the design

    • Deleted, with the ApplicationCustomizer in SPFx you could change anything you like. If you can insert css and javascript you could remove/add anything to a page (not sure if this would be recommended though!)

      • Deleted's avatar
        Deleted

        Is it not developer preview pieter?

  • I guess you have two options:

    1. Use an ApplicationCustomizer in SPFx Extensions to achieve this in a supported way. Please note, that SPFx Extensions currently is in developer preview and not production ready yet!
    2. Use a "Modern Script Editor Webpart", which has been built with SPFx Client-side webparts and is an official sample - check it out: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-script-editor

     

    To use the "Modern Script Editor Webpart" you will have to download, bundle and build the app package and deploy that to your App Catalog (at tenant level, for now) and then afterwards to your SharePoint site.

Resources