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 Character Sheet, broken tabs and tiny tables.

I'm working on making a custom character sheet for a home-brewed game I wanted to run, but I've run into some problems using tables in a repeating fieldset, and with using some radio-buttons tweaked to look like tabs.&nbsp; On the table, I don't know how to increase or change the width of the individual columns, which is causing some of the boxes to be unusably small. For the tabs / radio-buttons, I haven't figured out how to increase the size of them, so that players click on the tab to swap between them. Rather than the empty space to the left of the tab. Below is a link to my HTML code, with the problem table starting on line 339 and ending on line 377 <a href="https://pastebin.com/mPAfTWuP" rel="nofollow">https://pastebin.com/mPAfTWuP</a> Below is a link to the CSS code I'm using, with the problem section starting on line 474 <a href="https://pastebin.com/fJYV1Uew" rel="nofollow">https://pastebin.com/fJYV1Uew</a>
1564611172
Kraynic
Pro
Sheet Author
I am not so good with tabs, because I just stole mine from another sheet.&nbsp; For the table/repeating section, I would strip out all your width modifiers there, make sure you break down your labels enough to have sufficient references for css.&nbsp; A repeating section in my simple sheet: HTML &lt;div class='melee-grid-container' &gt; &lt;h5&gt;Weapon&lt;/h5&gt; &lt;h5&gt;Skill Lvl&lt;/h5&gt; &lt;h5&gt;Strike&lt;/h5&gt; &lt;h5&gt;Parry&lt;/h5&gt; &lt;h5&gt;Throw&lt;/h5&gt; &lt;h5&gt;Range&lt;/h5&gt; &lt;fieldset class="repeating_weaponmelee"&gt; &lt;div class='melee-grid-container' &gt; &lt;input class="sheet-input-center-aligned" type="text" value="" name="attr_melee_weapon_name" placeholder="Weapon Type" /&gt; &lt;input class="sheet-input-center-aligned" type="number" value="1" name="attr_melee_weapon_skill_level" /&gt; &lt;input class="sheet-input-center-aligned" type="number" value="0" name="attr_melee_weapon_strike" /&gt; &lt;input class="sheet-input-center-aligned" type="number" value="0" name="attr_melee_weapon_parry" /&gt; &lt;input class="sheet-input-center-aligned" type="number" value="0" name="attr_melee_weapon_throw" /&gt; &lt;input class="sheet-input-center-aligned" type="number" value="0" name="attr_melee_weapon_range" /&gt; &lt;/div&gt; &lt;/fieldset&gt; &lt;/div&gt; CSS .sheet-melee-grid-container{ display:grid; grid-template-columns: 213px 50px 50px 50px 50px 50px } Image: Since I reference the same grid for the labels and the repeating section, they are all kept aligned.&nbsp; I think the complicated class label from the repeating section was something inherited from a sheet I started altering and never got revisited.&nbsp; The main thing to take from this is the "melee-grid-container" being used twice so that the css applies to both.
Kraynic, Thanks for providing a sample of your sheet. creating a CSS object to organize the grid was exactly what I needed to do. Now I just need to fix the tabs.
1564627889
Finderski
Pro
Sheet Author
Compendium Curator
Here's the section of the CSS Wizardy wiki that shows the Tabs stuff... Though, to be honest, I've found it's easier to action buttons and sheet workers to do tabs now...you style the action buttons using CSS to look however you want to designate a "tab" and then use a sheet worker to set the attribute for the "sheet" display.
1564645658

Edited 1564645748
GiGs
Pro
Sheet Author
API Scripter
That sounds like an interesting approach, Finderski. Can you post an example of the html, css, and sheet worker where you use an action button to do this? Or point me to a sheet where you've done this.
1564651067
Finderski
Pro
Sheet Author
Compendium Curator
GiGs said: That sounds like an interesting approach, Finderski. Can you post an example of the html, css, and sheet worker where you use an action button to do this? Or point me to a sheet where you've done this. Don't have time at the moment (need to head out), but the Savage Worlds Tabbed sheet uses this method now. &nbsp;When I get back and have a little time, I'll post the stuff... :)
1564656281
Finderski
Pro
Sheet Author
Compendium Curator
Ok, here's how I use action buttons for tabs... HTML: &lt;div class="sheet-buttonbar"&gt; &lt;div class="sheet-navbuttons"&gt; &lt;button type="action" name="act_characterprofile1" class="sheet-topbuttons"&gt;U&lt;/button&gt; &lt;input type="checkbox" class="sheet-showVehicles" name="attr_vehicle" style="display: none;" /&gt; &lt;button type="action" name="act_vehicletab3" class="sheet-topbuttons sheet-vehiclesT"&gt;T&lt;/button&gt; &lt;button type="action" name="act_journaltab4" class="sheet-topbuttons"&gt;n&lt;/button&gt; &lt;button type="action" name="act_configurationtab2" class="sheet-topbuttons"&gt;x&lt;/button&gt; &lt;/div&gt; &lt;div class="sheet-functions"&gt; &lt;input type="checkbox" class="sheet-useBenniesXP" name="attr_bennies" value="1" style="display: none;" /&gt; &lt;button class="sheet-benniesxp" type="roll" name="roll_convertBennies" value="&amp;{template:emote} {{name=@{character_name}}} {{does=rolls for XP on ?{Number of Bennies|1} un/spent bennies and gets [[?{Number of Bennies|1}d6&gt;5]] extra experience point(s)!}}"&gt;S&lt;/button&gt; &lt;input class="sheet-isWC" type="hidden" name="attr_is_npc" /&gt; &lt;button class="sheet-statblock" type="roll" name="roll_fullstatblock" value="/w gm &amp;{template:statblock} @{chardesc} {{charatts=@{charatts}}} {{charskills=@{charskills}}} {{charderived=@{charderived}}} {{chargear=@{chargear}}} {{charhindrances=@{charhindrances}}} {{charedges=@{charedges}}} {{showspec=@{showspec}}} {{charspecabilities=@{charspecabilities}}} {{powercount=[[1d0+@{powercount}]]}} {{charpowers=@{charpowers}}}"&gt;&lt;span class="sheet-showWCicon" name="attr_WCI"&gt;&lt;/span&gt;&lt;img style="height: 28px;" src="<a href="http://imgsrv.roll20.net/?src=github.com/finderski/SWT/blob/master/BackgroundImages/statblock_profile.png%3Fraw%3Dtrue&quot;&lt;/button" rel="nofollow">http://imgsrv.roll20.net/?src=github.com/finderski/SWT/blob/master/BackgroundImages/statblock_profile.png%3Fraw%3Dtrue"&lt;/button</a>&gt; &lt;/div&gt; &lt;div class="sheet-docbuttons"&gt; &lt;input type="hidden" name="attr_newcontent" value="read" class="sheet-newcontent" /&gt; &lt;button type="action" name="act_releasetab5" class="sheet-topbuttons sheet-releasenotesbutton"&gt;N&lt;/button&gt; &lt;input type="hidden" name="attr_newdocumentation" value="read" class="sheet-newdocumentation" /&gt; &lt;button type="action" name="act_documentationtab6" class="sheet-topbuttons sheet-documentationbutton"&gt;i&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;input type='radio' class='sheet-characterT' name='attr_sheetTab' style="display: none;" value='1' checked /&gt; &lt;input type="radio" class="sheet-journalT" name="attr_sheetTab" style="display: none;" value="4" /&gt; &lt;input type='radio' class='sheet-vehiclesT' name='attr_sheetTab' style="display: none;" value='3' /&gt; &lt;input type='radio' class='sheet-configT' name='attr_sheetTab' style="display: none;" value='2' /&gt; &lt;input type='radio' class='sheet-releaseN' name='attr_sheetTab' style="display: none;" value='5' /&gt; &lt;input type='radio' class='sheet-documentatioN' name='attr_sheetTab' style="display: none;" value='6' /&gt; &lt;!--Character Sheet Tab--&gt; &lt;div class='sheet-character'&gt; &lt;!--stuff--&gt; &lt;/div&gt; &lt;div class='sheet-notes'&gt; &lt;!--stuff--&gt; &lt;/div&gt; &lt;div class='sheet-vehicles'&gt; &lt;!--stuff--&gt; &lt;/div&gt; &lt;div class='sheet-config'&gt;&nbsp; &lt;!--stuff--&gt; &lt;/div&gt; &lt;div class="sheet-release"&gt; &lt;!--stuff--&gt; &lt;/div&gt; &lt;div class='sheet-documentation'&gt; &lt;!--stuff--&gt; &lt;/div&gt; CSS: /* Tab Stuff */ .sheet-character, .sheet-config, .sheet-vehicles, .sheet-notes, .sheet-release, .sheet-documentation { display: none; } .sheet-release, .sheet-documentation { &nbsp; &nbsp; background: rgba(255,255,255,0.75); } .sheet-characterT:checked ~ div.sheet-character, .sheet-configT:checked ~ .sheet-config, .sheet-vehiclesT:checked ~ div.sheet-vehicles, .sheet-journalT:checked ~ div.sheet-notes, .sheet-releaseN:checked ~ div.sheet-release, .sheet-documentatioN:checked ~div.sheet-documentation { display: block; width: 100%; margin: 0px; padding: 0px; } /* Button Stuff */ .sheet-topbuttons { &nbsp; &nbsp; background-color: transparent; &nbsp; &nbsp; font-family: "Pictos"; &nbsp; &nbsp; font-size: 2em; &nbsp; &nbsp; border: none; &nbsp; &nbsp; background-image: none; &nbsp; &nbsp; font-weight: bold; &nbsp; &nbsp; box-shadow: none; &nbsp; &nbsp; text-shadow: none; &nbsp; &nbsp; height: 28px; &nbsp; &nbsp; margin: 0px; &nbsp; &nbsp; padding: 0 5px 0 5px; } Sheet Worker: const buttonlist = ["characterprofile1","vehicletab3","journaltab4","configurationtab2","releasetab5","documentationtab6"]; buttonlist.forEach(buttonlist =&gt; { on(`clicked:${buttonlist}`, function() { console.log(`${buttonlist} button was clicked!!`); let radioval = `${buttonlist}`; radioval = radioval.slice(-1); console.log(`Value for Radio Button is: ${radioval}`); setAttrs({ sheetTab: radioval }); if (radioval === "5") { setAttrs({ newcontent: "read" }); } if (radioval === "6") { setAttrs({ newdocumentation: "read" }); } }); });
1564656546
GiGs
Pro
Sheet Author
API Scripter
That does look pretty nifty, thanks! I look forward to playing around with it later.