2

I have some custom html e js files that i am using in PDPs, (pages) of sharepoint, but the css its not being loaded.

I importing the files like this:

<link rel="stylesheet" type="text/css" href="../SiteAssets/js/SlickGrid/Css/slick.grid.css"/>
<link rel="stylesheet" type="text/css" href="../SiteAssets/js/SlickGrid/Css/slick.pager.css"/>
<link rel="stylesheet" type="text/css" href="../SiteAssets/js/SlickGrid/css/jquery-ui.min.css"/>
<link rel="stylesheet" type="text/css" href="../SiteAssets/js/SlickGrid/Css/examples.css"/>
<link rel="stylesheet" type="text/css" href="../SiteAssets/js/SlickGrid/Css/slick.columnpicker.css"/>
<link rel="stylesheet" type="text/css" href="../SiteAssets/js/PDP/vendor/bootstrap/css/bootstrap.min.css"/>
<link rel="stylesheet"type="text/css" href="../SiteAssets/Js/Bootstrap/startbootstrap/vendor/font-awesome/css/font-awesome.min.css"/>

The css files are loaded but not "executed". However when a put some css code from a external address (cdn) the style works properly.

I used this files in sharepoint online and always works fine. What am my missing when doing this in sharepoint server 2019?

2

Are the files checked in?

Is the path valid? What happens if you change

../SiteAssets/js

to an absolute path:

http://yourserver/sites/yoursite/SiteAssets/js....restOfYouPath....
  • Still the same. I can see in console that the css are loaded to the page, but for some reason it is like the files is not executing/reading the css file. – Snmr Jul 6 at 12:51
0

It seems to be a known issue in SharePoint 2019, you may need to wait for a hotfix to fix this issue.

Common issue: SP2019 – Items in document libraries are downloaded with mime-type application/octet-stream rather than the accurate one

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.