4

I am trying to make a css change to my sharepoint 2013 site. I make the change to the css and save it, but it isn't reflected on the site.

Things I have tried:

  • I make a more drastic broadly scoped change to the css, something
    like div{border: 2px solid red} and it still doesn't show up
  • Deleted CSS file -> css still being applied to site normally
  • Restored css file and changed the name in file explorer view -> Sharepoint updates my Masterpage.html link tag automatically and css changes are now reflected correctly. Tried to make a new change in newly renamed file. Change NOT represented on site. Rename to a 3rd name -> site reflects changes correctly.
  • Changed link tag in masterpage.html manually back to 1st name of css file -> site's styling changes back to styles inline with old css before any changes even tho there is NO file in the directory with this name.
  • Changes link tag to name of 2nd rename of css file -> Site changes in line with css during that rename state. This file ALSO does not exist currently
  • Empty all caches, files, temps. Try different browsers, Try incognito mode. Everything continues to be inline with previous findings.
  • Inspecting css file in developer tools displays css file inline with the stat at whichever naming I check. So If the link tag is pointing to the non-existent first name of css it will open a css file with no changes even tho that file does not exist.

What am I missing? Is sharepoint copying these files somewhere and then somehow accessing them even those the href is pointing to a location that doesn't exist?

2

Try to do the following:

  1. Clear your IE Browser Cache,
    • Open IE, hold Ctrl + F5,
    • Then hold Ctrl+Shift+Del to delete the selected below

enter image description here

  1. Edit your CSS file via SharePoint Designer

    • Open SharePoint Designer, Open your site.
    • Navigate to all files > Check out your file, Open your CSS file in advanced mode.
    • Edit your CSS file and make sure that you are using !important like this

      div{border: 2px solid red !important;}
      
    • Save your changes, Check in your file.if it requires Publish publish it as a major version.

    • Browse your site now it should be reflected with your CSS changes.
  • Didn't work. Same behavior as above. New Css Change not reflected. Sharepoint still able to show css from file that no longer exists and infact can display and download entire deleted css file if referenced via old name. – Neberu Aug 4 '17 at 22:16
  • do you enable publishing feature? – Mohamed El-Qassas MVP Aug 4 '17 at 22:21
  • This folder, the "assets" folder in the _catalogs/masterpage doesn't require or allow publishing. I can check out and check in but there's no option to publish. Also I should note that this all worked as of a couple weeks ago when I have to make the last css change it was as simple as just editing the .css file and saving. – Neberu Aug 4 '17 at 22:26
  • do you added !important – Mohamed El-Qassas MVP Aug 4 '17 at 22:26
  • yeah I copied exactly what you put in your post. Also it's easy to see if the change is being picked up in dev tools since the old version of the file was compressed css and to make it obvious the new version is uncompressed css. It is still showing the old compressed version. Which doesn't even exist anymore since I deleted it and emptied sharepoint's recycling bin – Neberu Aug 4 '17 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.