Forum Discussion
Shading in news web part
Hello Everyone. Here's steps we performed to remove the gray shading in all Carousel images.
First, follow the guide to allow custom scripts from running on your SharePoint site of choice:
https://www.sharepointdiary.com/2017/12/how-to-enable-custom-script-in-sharepoint-online.html
The Cmdlet within SPO-Module is:
Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False
Then follow this guide to install the CSS Injection App to your tenant and site:
https://www.sharepointdiary.com/2020/11/add-custom-css-to-sharepoint-online-modern-page.html
Once you've fully added the CSS Injector web-part, add it anywhere within the page that your Carousel is also on. The CSS Injector is *not* visible when viewing the published page, only in editing mode.
Once the webpart is added, add the following CSS code snippet. It will hide all shading in the carousel.
<style>
.bp_b_91bed31b{display:none}
.ax_a_91bed31b{display:none}
</style>
The result is branded images exactly as they should be!