question

sns1 avatar image
1 Vote"
sns1 asked sns1 commented

can we update the css code in seattle master with out using sharepoint desinger

can we update the css code in seattle .master with out using from SharePoint designer? If yes please help me with clear steps

sharepoint-dev
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
0 Votes"
MichaelHan-MSFT answered sns1 commented

Hi @sns1,

As a workaround, you could apply custom css to sharepoint site like this:

  1. In site settings page, find "Site Collection Features" setting and enable feature SharePoint Server Publishing Infrastructure.

  2. Find "Manage Site Features" setting and enable feature SharePoint Server Publishing.

  3. Find "Master Page" setting link under "Look and Feel".

  4. Click "Alternate CSS URL". This is where you apply your own CSS file.

  5. Upload a CSS file to any document library. Ideally to "Style Library".

  6. Go to step 4 and choose your uploaded CSS file.

128075-image.png



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 (85.6 KiB)
· 5
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,

GM=:)

Thank you for the response.

I have tried to follow steps you have given, but stuck at style library.
Do you want to update code ( attached ) in style library? if yes, Please tell me how to upload in style library and in which folder in the style library?
and Do I need place that code in the text file and upload it? Please find attached screenshots. Please clarify with screenshots with detailed steps.

As you are aware I am expecting output as per the attached screenshot in the master page. Please help
128173-expectednavigation.png128135-howcodetobeplaceinstylelibrary.png128047-capture.png


0 Votes 0 ·

@sns1,

You need to put the code in a file, remove the style tag. Rename the file with .css extension.


128201-image.png


Then upload the css file (my is test.css) to style library, just to the root folder will be ok. Make sure you check in the file.

128211-image.png


0 Votes 0 ·
image.png (19.5 KiB)
image.png (61.2 KiB)
sns1 avatar image sns1 MichaelHan-MSFT ·

Hi Michael Han,

It worked.
so we have not set it default master page, how it is working after saving? and does it applies to all subsites as well or do we need to separately for subsites?

0 Votes 0 ·
Show more comments