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

Custom sheet CSS problem

So I'm improving on my custom sheet for my game and try to get the css work with one of my templates. So the functionallity works just as intended but none of my CSS code works, it just refuses to read that code. Is there a trick you have to add in the declaration of the CSS class? HTML: <rolltemplate class="sheet-rolltemplate-frenzy"> <div class="sheet-rolltemplate-chatbackground"> <div class="sheet-rolltemplate-chatheadline">Rolling for frenzy</div> <div>{{result}} Successes</div> {{#rollLess() result frenzydiff}} <img src="image1.png" class="sheet-rolltemplate-chatimage" /> {{/rollLess() result frenzydiff}} {{#rollBetween() result frenzydiff bigfrenzydiff}} <img src="image2.png" class="sheet-rolltemplate-chatimage" /> {{/rollBetween() result frenzydiff bigfrenzydiff}} {{#rollGreater() result bigfrenzydiff}} <img src="image3.png" class="sheet-rolltemplate-chatimage" /> {{/rollGreater() result bigfrenzydiff}} </div> </rolltemplate> CSS: div.sheet-rolltemplate-chatbackground { background-color: white; padding: 10px; background: url(image.jpg);         background-repeat: no-repeat; background-size: contain;         width: 200px;         height: 200px; } span.sheet-rolltemplate-chatbold { font-weight: bold; } div.sheet-rolltemplate-chatheadline { font-weight: bold; font-size: 18px; margin-top: 15px; margin-bottom: 15px; margin-left: 15px; } img.sheet-rolltemplate-chatimage { max-width: 175px; margin-left: 15px; }
1612200460
GiGs
Pro
Sheet Author
API Scripter
You shouldnt create subclasses like this: <div class="sheet-rolltemplate-chatbackground"> Every class under the main rolltemplate div should just have a normal class. Like this one, you'd use  <div class="sheet-chatbackground"> Then in your CSS you would get that like this div.sheet-rolltemplate-frenzy .sheet-chatbackground { or div.sheet-rolltemplate-frenzy div.sheet-chatbackground {
Thank you!  That worked wonders :).
1612366970
GiGs
Pro
Sheet Author
API Scripter
Great :)