question

sns1 avatar image
0 Votes"
sns1 asked sns1 commented

I want to get navigation with red and green in master page

127345-capture.pngI want to get navigation with red and green in master page left side navigation. PFA for example, how it can be achievable?

Please share me relevant script and how to add that in the master page?

and in team site, communication site, in a classic team sites, is it same process in all types of sites to perform that change?


office-sharepoint-onlinesharepoint-dev
capture.png (132.5 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MichaelHan-MSFT avatar image
1 Vote"
MichaelHan-MSFT answered sns1 commented

Hi @sns1,

You could add the below css style in master page:

<style>
.ms-core-listMenu-verticalBox > .ms-core-listMenu-root > li > .ms-core-listMenu-item {
background-color: green!important;
color:white;
}
.ms-core-listMenu-verticalBox > .ms-core-listMenu-root > li:first-child .ms-core-listMenu-item{
background-color: red!important;
color:white;
}
</style>

You could use sharepoint designer to add the code in master page > seattle.master:

127476-image.png

The code should be added in head tag:

127505-image.png

It's the same step for all sites. But it only works in classic experience.


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.




image.png (101.7 KiB)
image.png (14.0 KiB)
· 7
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Michael Han,

Thank you for the response. After long time I saw response from you==), How are you?

and does it mean the site I use in SharePoint online should be created with other options and team site template to get classic experience?
Does Team and modern communication sites does not work?

0 Votes 0 ·

Hi @sns1,

I'm fine. Good to see you again :)

You don't have to create sites with other options.
Just in SharePoint online, the default experience is modern experience, but we can switch to classic experience. You could refer to this article for more: https://support.microsoft.com/en-us/office/switch-the-default-experience-for-lists-and-libraries-from-new-or-classic-66dac24b-4177-4775-bf50-3d267318caa9

It's also work in team and modern communication sites, but you need to use classic experience.

0 Votes 0 ·
sns1 avatar image sns1 MichaelHan-MSFT ·

Hi Michael Han,

Great. I tried adding the code in the seattle.master by navigating to seattle.master-->open in advanced mode--> Added from SP designer. PFA
However, I am not seeing any output. Please help. What wrong I am doing. Please provide clear steps.
127650-nosign.png127669-addedcode.png


0 Votes 0 ·
nosign.png (47.6 KiB)
Show more comments