Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

Refer CSS file in layouts folder with relative url

$
0
0

Hello,

I am developing a SharePoint hosted app. In that I am referencing a javscript from sharepoint app with following code:
<script type="text/javascript" src="/_layouts/15/custom.js"></script>

But when I reference a css file from sharepoint app with following code:
<link rel="stylesheet" type="text/css" href="/_layouts/15/ABG.Onstream2/css/style.css">

I get 403 forbidden error. The CSS file doesn't load. If I write href fully i.e. with site collection URL, the file is loaded.
Can anyone give suggestion on how to refer css file with relative address in SharePoint hosted app?

Thank you.


Viewing all articles
Browse latest Browse all 8089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>