Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

CSS does not load relative path

1585085054
Marco M.
KS Backer
Sheet Author
API Scripter
Compendium Curator
Hi I don't know if it's a problem on the code or an issue with roll20. I've uploaded a character sheet and a folder with all the art. Now in the HTML I used src="img/makefile" to load the image. Everything looks fine. In the CSS however if I changed the URL for the background image from&nbsp; &lt;code&gt; background-image: url('<a href="http://site.com/image" rel="nofollow">http://site.com/image</a>') &lt;/code&gt; to &lt;code&gt; background-image: url('img/image') &lt;/code&gt; Roll20 is unable to find it, and no background image is displayed. I tried offline before putting it on GitHub and everything looked fine. I checked some of the other sheets with extensive art like the alien one and the url was given in the form &lt;code&gt;http ://GitHub.com/Roll20/roll20/character-sheet/gamefolder/img/name?raw=true &lt;/code&gt; Is this the correct form?
1585086308
Andreas J.
Forum Champion
Sheet Author
Translator
You can't use relative path, you must reference the full url of the image for this to work. Look at any existing sheet and you won't find a single one who use relative path, exactly because it doesn't work.
1585087482
Marco M.
KS Backer
Sheet Author
API Scripter
Compendium Curator
Thanks, I wasn't aware. I saw it working for html src and I thought it was working for css. I will fix it ASAP :)