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 here.
×
×
Cookie Preferences
We use Cookies to help personalize and improve Roll20. For more information on our use of non-essential Cookies, visit our Privacy Policy here.
Trying to figure out how to set a background image for my HTML but the CSS seems to be ignoring any body tags which means I also can't change the color. What am I missing here?
What's your CSS look like? Does your body have a <div> tag as the main container? In your CSS you may want to .charsheet in front of your body tag as well. Something like this: .charsheet body {
background-image: url("<a href="http://www.someurl.com/some-image.jpg" rel="nofollow">http://www.someurl.com/some-image.jpg</a>");
}
Can you post your html (or link to it) and your CSS? One thing to remember (because it's easy to forget) is that your class names in the CSS file need to start with .sheet- (and to keep things clean, I do that in my html, too).
LOL - no worries...still happens to me from time to time. As for the other...Well, if there is an element, like a <div> tag that covers the entire body and it has a solid color for the background, it would hide the image in the <body>. I don't know if that's what is happening or not (without seeing the code). :)
Ok, I think I know the problem...the character sheet doesn't have a body tag of its own. You would want to change that to a div and give it a class of some sort. Then update your CSS to reflect that change. Does that make sense?
There can only be one <body> tag in an HTML document. The entire VTT is one document. Trying to put a <body> tag in your character sheet produces invalid markup; the browser will more likely than not simply throw the tag out, making your CSS not match anything. If you simply want to put a background color or image over the entire sheet, using just .charsheet on its own as your selector should work fine.