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 sheets, trouble with multiple tabs

1538915700

Edited 1538915913
I've been using the <a href="https://wiki.roll20.net/CSS_Wizardry#Tabs" rel="nofollow">https://wiki.roll20.net/CSS_Wizardry#Tabs</a> &nbsp;to figure out how to create tabs, and I managed to get one set working. I then wanted to create another set of tabs, but they're not working and I can't figure out what the problem is. HTML: &lt;input type="radio" name="attr_tab" class="sheet-tab sheet-tab1" value="1"&gt;&lt;b&gt;Masteries&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_tab" class="sheet-tab sheet-tab2" value="2" checked="checked"&gt;&lt;b&gt;Weapon Masteries&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_tab" class="sheet-tab sheet-tab3" value="3"&gt;&lt;b&gt;Magic&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_tab" class="sheet-tab sheet-tab4" value="4"&gt;&lt;b&gt;Social&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_tab" class="sheet-tab sheet-tab5" value="5"&gt;&lt;b&gt;Abilities&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_tab" class="sheet-tab sheet-tab6" value="6"&gt;&lt;b&gt;Inventory&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;hr/&gt; &lt;!--Masteries--&gt; &lt;div class="sheet-tab-content sheet-tab1"&gt;&lt;/div&gt; &lt;!--Weapon Masteries--&gt; &lt;div class="sheet-tab-content sheet-tab2"&gt; &lt;input type="radio" name="attr_wtab" class="weapon-tab weapon-tab1" value="1" checked="checked"&gt;&lt;b&gt;Martial Prowess&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_wtab" class="weapon-tab weapon-tab2" value="2"&gt;&lt;b&gt;Dagger Mastery&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_wtab" class="weapon-tab weapon-tab3" value="3"&gt;&lt;b&gt;1h Sword Mastery&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_wtab" class="weapon-tab weapon-tab4" value="4"&gt;&lt;b&gt;Greatsword Mastery&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_wtab" class="weapon-tab weapon-tab5" value="5"&gt;&lt;b&gt;Spear Mastery&amp;emsp;&amp;emsp;&lt;/b&gt; &lt;input type="radio" name="attr_wtab" class="weapon-tab weapon-tab6" value="6"&gt;&lt;b&gt;Shield Mastery&amp;emsp;&amp;emsp;&lt;/b&gt; &nbsp;&nbsp;&nbsp;&nbsp;&lt;hr/&gt; &lt;!--Martial Prowess--&gt; &lt;div class="weapon-tab-content weapon-tab1"&gt;&lt;/div&gt; &lt;!--Dagger Mastery--&gt; &lt;div class="weapon-tab-content weapon-tab2"&gt;&lt;/div&gt; &lt;!--One Handed Sword Mastery--&gt; &lt;div class="weapon-tab-content weapon-tab3"&gt;&lt;/div&gt; &lt;!--Greatsword Mastery--&gt; &lt;div class="weapon-tab-content weapon-tab4"&gt;&lt;/div&gt; &lt;!--Spear Mastery--&gt; &lt;div class="weapon-tab-content weapon-tab5"&gt;&lt;/div&gt; &lt;!--Shield Mastery--&gt; &lt;div class="weapon-tab-content weapon-tab6"&gt;&lt;/div&gt; &lt;/div&gt; &lt;!--Magic--&gt; &lt;div class="sheet-tab-content sheet-tab3"&gt;&lt;/div&gt; &lt;!--Social--&gt; &lt;div class="sheet-tab-content sheet-tab4"&gt;&lt;/div&gt; &lt;!--Abilities--&gt; &lt;div class="sheet-tab-content sheet-tab5"&gt;&lt;/div&gt; &lt;!--Inventory--&gt; &lt;div class="sheet-tab-content sheet-tab6"&gt;&lt;/div&gt; CSS: div.sheet-tab-content {display:none;} input.sheet-tab1:checked ~ div.sheet-tab1, input.sheet-tab2:checked ~ div.sheet-tab2, input.sheet-tab3:checked ~ div.sheet-tab3, input.sheet-tab4:checked ~ div.sheet-tab4, input.sheet-tab5:checked ~ div.sheet-tab5, input.sheet-tab6:checked ~ div.sheet-tab6 { display: block; } div.weapon-tab-content {display:none;} input.weapon-tab1:checked ~ div.weapon-tab1, input.weapon-tab2:checked ~ div.weapon-tab2, input.weapon-tab3:checked ~ div.weapon-tab3, input.weapon-tab4:checked ~ div.weapon-tab4, input.weapon-tab5:checked ~ div.weapon-tab5, input.weapon-tab6:checked ~ div.weapon-tab6 { display: block; } If anyone could explain to me what I did wrong I'd be really thankful. EDIT: Incase it wasn't clear, it's the sheet-tab that's working, but not weapon-tab
1538924573
Jakob
Sheet Author
API Scripter
The reason it's not working is the fact that Roll20 automatically prepends "sheet-" to all CSS classes in the HTML, so your&nbsp; &lt;div class="weapon-tab-content weapon-tab1"&gt;&lt;/div&gt; ends up looking like this in the displayed sheet: &lt;div class="sheet-weapon-tab-content sheet-weapon-tab1"&gt;&lt;/div&gt; Hence, the CSS no longer works.
Thanks!