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

Trying to make a Custom Roll Template, but...

Hey there everyone! So, I'm trying to create a basic roll template, stemming from the default one that is included in Roll20. Sadly, there doesn't seem to be any 'exact' code for it to do so. Upon scouring the web and trying my hand so far, I've managed to come up with a design that I like (depicted below). Sadly, upon entering the code into the game's general settings (yes, I am ignorant on how to code, but am stubbornly learning), it never displays the caption header properly; and ends up like this: Anyone know how to fix this by chance? Despite the length, I shall include what html and css I have managed to come up with and much thanks in advance! HTML <rolltemplate class="sheet-rolltemplate-conan"> <br> <div> <table> <table> <caption>{{name}}</caption> {{#allprops()}} <tr><td>{{key}}</td><td>{{value}}</td> {{/allprops()}} </table> </rolltemplate> CSS .sheet-rolltemplate-conan table { width: 100%; } .sheet-rolltemplate-conan th, caption { background-color: rgba(23, 59, 11,1); color: #ffffff; padding: 2px; border-bottom: 1px solid white; line-height: 1.6em; font-size: 1.2em; } .sheet-rolltemplate-conan .userscript-tcat { font-weight: bold; } .sheet-rolltemplate-conan td { padding: 5px; border-bottom: 1px solid white; } .sheet-rolltemplate-conan tr:nth-child(odd) { background-color: rgba(198, 181, 111,1); } .sheet-rolltemplate-conan tr:nth-child(even) { background-color: rgba(218, 201, 131,1); } .sheet-rolltemplate-conan .inlinerollresult { display: inline-block; min-width: 1.5em; text-align: center; border: 2px solid black; /*black*/ } .sheet-rolltemplate-conan .inlinerollresult.fullcrit { border: 2px solid #3FB315; } .sheet-rolltemplate-conan .inlinerollresult.fullfail { border: 2px solid #B31515; } .sheet-rolltemplate-conan .inlinerollresult.importantroll { border: 2px solid #4A57ED; }
1531059119

Edited 1531059247
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I think this is your problem: .sheet-rolltemplate-conan th, caption { background-color: rgba(23, 59, 11,1); color: #ffffff; padding: 2px; border-bottom: 1px solid white; line-height: 1.6em; font-size: 1.2em; } You're missing the  .sheet-rolltemplate-conan before the caption. This means that the sheet parser removes the caption declaration before injecting the code into the table's code.
That was it!!! A simple oversight as usual LOL... "Brunhilda, extend the man my eternal thanks for his assistance..."
What it will look like now and yes, it's for Conan 2d20 :P
1531084655
Jakob
Sheet Author
API Scripter
Also, your HTML is a bit strange... the following code should do the exact same thing, but will be valid HTML: <rolltemplate class="sheet-rolltemplate-conan"> <table> <caption>{{name}}</caption> {{#allprops()}} <tr><td>{{key}}</td><td>{{value}}</td> {{/allprops()}} </table> </rolltemplate>