none
Custom Master Page is not reading updated .css file

    Question

  • Hello everyone,

    I am creating a custom master page but I am getting problems when I update my custom css. 

    My steps were like this: 

    1- I created a static HMTL-CSS page and tested it. Evrething works fine.

    2- I created a new folder in the masterpage mapped drive and moved the HTML and CSS files in there.

    3- I ran SP Design manager and no error found in my HMTL so I got my .master file. I can see the result in the preview window.

    4- When i make any change to my custom CSS file, this changes are not reflected in the preview window. If I inspect the page, there is no sign of my updated code in the .css file. Is like Sharepoint is not reading the CSS when it is changed.

    What can be the problem? I know that is not problem of wrong linked css files, otherwise the page should not looks right as it does.

    Greetings!!!

    UPDATE!!

    I have just removed the reference to my custom css file from the custom master page and as expected the design went away. Then I linked the css file back but this time I deleted everything from the css file and the design comes back. How is that posible, the css file is empty???


    • Edited by Americo2014 Friday, April 07, 2017 8:29 AM Ran a test
    Friday, April 07, 2017 8:07 AM

Answers

  • Hi,

    Please follow below steps to validate:

    >open the view source and open your custom css file in new tab or browser and check that it's loading or not.

    >clear all items from "Temporary Internet Files" and reload the page again Ctrl + F5


    Thanks, Amit Kumar, LinkedIn Profile ** My Blog

    Friday, April 07, 2017 9:09 AM

All replies

  • Well I Think that I know what is happening.

    I am looking the page in Chrome and Chrome doesn't reload the css file. I tested in IE and Everything works well.

    Why Chrome is doing that?

    Friday, April 07, 2017 8:39 AM
  • Hi

    maybe are not applied !

    use dev tool in your browser and check which style is applied ( your custom style is overwrite )

    Set it as !important to force to be applied mandatory


    Romeo Donca, Orange Romania (MCSE, MCITP, CCNA) Please Mark As Answer if my post solves your problem or Vote As Helpful if the post has been helpful for you.

    Friday, April 07, 2017 8:53 AM
  • thanks for the tips.

    I did that but chrome is not Reading my custom css or better said is not re-Reading my custom css. So it doesn't matter if I use important or not .

    Friday, April 07, 2017 9:08 AM
  • Hi,

    Please follow below steps to validate:

    >open the view source and open your custom css file in new tab or browser and check that it's loading or not.

    >clear all items from "Temporary Internet Files" and reload the page again Ctrl + F5


    Thanks, Amit Kumar, LinkedIn Profile ** My Blog

    Friday, April 07, 2017 9:09 AM