1

I'm beginner in SharePoint Online so trying to remove logo showing at top left side using the Alternate CSS URL option in the Master page.

Logo that I need to remove is shown here along with its Inspect element view: http://prntscr.com/t6kpod

I used the below code in CSS:

div[class^="logoImg-62"] {
    display: none !important;
}

Need to know what i'm missing?

4 Answers 4

0

You may try with the below CSS or PnP PowerShell.

CSS

div[class^="logoCell-119"]
 {
    display: none !important;
}

OR

img[src*='siteIcon'] { display: block;} 

Note:

  • Customizing or script editor web part is not supported in modern SharePoint online, so as an alternate we can deploy and make use of modern script editor web part.

How to inject custom CSS or javascript code in modern SharePoint Online?

We can use the modern script editor web part for this. The good thing is that we don't o need to develop this web part from the beginning, we can just deploy the modern script editor web part which is built on SPFx (alternate of classic script editor web part), we can get the modern script editor web part from here.

For details refer to the below article:

SharePoint Online, how to hide the SharePoint logo on a list using css or jquery

SharePoint Online Logo Link

5
  • OP wants to remove/hide only site logo and not the complete top banner. Commented Jun 26, 2020 at 0:59
  • yes i need to only remove site logo not the whole banner.
    – Xam
    Commented Jun 26, 2020 at 11:22
  • You can use this CSS class^="logoCell-119"
    – SP 2022
    Commented Jun 26, 2020 at 12:14
  • customization in modern isn't supported anymore, only way is to do via SPFx Application Customizer
    – Xam
    Commented Jun 26, 2020 at 12:24
  • No need to develop this from the begining, you can just deploy the modern script editor web part which is built on SPFx (alternate of classic script editor web part), get the modern script editor web part from here. medium.com/niftit-sharepoint-blog/…
    – SP 2022
    Commented Jun 26, 2020 at 12:27
0

The easiest way to do this requires no CSS or scripting. It's to upload a 192x192 transparent image.

0

Try using below CSS:

<style>
    div[class^="logoCell-"] {
       display: none !important;
    }
</style>

Also, if it is not working using alternate CSS (As modern pages does not support this) then you can try adding it using SPFx Application customizer (if you want to hide it from all modern pages) or Modern Script Editor webpart (if you want to hide it from only one page).

References:

  1. Inject Custom CSS on SharePoint Modern Pages using SPFx Extensions
  2. Supported customizations for "modern" pages
  3. Sharepoint 365 - Add Custom CSS to Modern Pages

Update:

You can also try this:

  1. Click on settings (gear icon) > Change the look > Header
  2. Upload white transparent image as site logo and site thumbnail
  3. Save

Check my answer given on this thread for more information: SharePoint Header Site remove

10
  • I tried using this but no luck prntscr.com/t6vwoz
    – Xam
    Commented Jun 26, 2020 at 11:20
  • Try using the exact CSS given in my answer. do not use the number part after - as it changes sometimes Commented Jun 26, 2020 at 11:22
  • do i need to use the <style> tag as well?
    – Xam
    Commented Jun 26, 2020 at 11:23
  • Yes, you can use the style tag...see my updated answer. Commented Jun 26, 2020 at 11:24
  • thanks, i updated in the file in Site Assets location and update the path in the Alternate CSS URL as /sites/Techo/SiteAssets/LogoRemove.css , but can't see the change.
    – Xam
    Commented Jun 26, 2020 at 11:27
0

Update, I added a 24 x 24 px transparent background and that did the trick. I figured out the size by inspecting the image in the global nav and checking it's size in the dev tools.

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.