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

Div Background not working?

1405141136
Wil
Pro
Sheet Author
I'm trying to set the background image on a div element. It works locally, but it won't work in Roll20. Is this something that is stripped out?
1405143097
Lithl
Pro
Sheet Author
API Scripter
What's the code you're using?
1405225418
Wil
Pro
Sheet Author
&lt;div style="background-image: url(<a href="https://sites.google.com/site/2000tonsofpurewhoopass/home/FatePoints.png" rel="nofollow">https://sites.google.com/site/2000tonsofpurewhoopass/home/FatePoints.png</a>); height: 100px; width: 100px; background-repeat: no-repeat;"&gt;&lt;br&gt; &lt;/div&gt; Works fine locally. Doesn't work in my sheet. You can see it working here too: <a href="http://asifproductions.com/test.html" rel="nofollow">http://asifproductions.com/test.html</a>
1405264099

Edited 1405264131
Lithl
Pro
Sheet Author
API Scripter
When you use images on your character sheet, they get filtered through a Roll20 url. Your <a href="https://sites.google" rel="nofollow">https://sites.google</a>... address becomes <a href="http://imgsrv.roll20...?src=sites.google" rel="nofollow">http://imgsrv.roll20...?src=sites.google</a>... Specifically, the filtered url for your image is coming up with a code 302 (Moved Temporarily), so the image won't render when the character sheet is displayed. This is not normal behavior, as it doesn't occur for background images on other sheets. I can only speculate that it's being caused by the fact that your original image is on a secured connection. Try uploading the image to something like imgur.com: some hosting location that you can get an HTTP link, rather than an HTTPS link (all Google Sites pages will force you onto an HTTPS connection). See if that solves your problem.
1405373980
Wil
Pro
Sheet Author
Thanks, I'll try that out once I get the rest of the sheet working right.