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 .
×
🍵 What is a cleric’s favorite hot drink? Divini-tea. 🍵
Create a free account

Need help in building custom sheet

Hello! I am having difficulties with a repeating section. He is creating infinite blocks to the side instead of being down. I probably need an Event Listener, but I'm not sure how to use it. Can somebody help me? Here is the code and how it is <div class='sheet-config'> <div class="2colrow"> <div class="col"> <fieldset class="repeating_vantagens" style="display: none;"> <label>Nome</label><input type="text" name='attr_vantagem'><br> <label>Custo</label><input type="number" name='attr_custo'><br> <label>Descrição</label><textarea style="resize:none" name='attr_desc_vant'></textarea> <button type='roll' name='roll_AtaqueD' value='&{template:default} {{name=@{vantagem}}}{{@{desc_vant}}}'></button> <hr> </fieldset> </div> </div>
1581038139

Edited 1581038290
GiGs
Pro
Sheet Author
API Scripter
If youre not using CSS to style it, you should probably put a <br/>  before that <hr>. Maybe smethin'gs overriding the default behaviour of the <hr>.  Do you have any CSS on your sheet?
1581038418
GiGs
Pro
Sheet Author
API Scripter
Actually never mind, none of your <br>s are working. Maybe this is your issue: <fieldset class="repeating_vantagens" style="display: none;"> You dont want display:none  there, replace it with <fieldset class="repeating_vantagens" >
None of them worked =/ My Css .charsheet { background-color: #ddd; min-width: 800px; } .charsheet label { display: inline-block; width: 75px; text-align: right; } .charsheet input { display: inline-block; width: 165px; } .charsheet input.sheet-short { width: 3.5em; } .charsheet table td, .charsheet table th { font-size: 1.2em; font-weight: bold; text-align: center; } select.sheet-dtype { width: 60px; vertical-align: top; } textarea { resize: vertical; overflow: auto; } div { display: flex; } .sheet-personagem, .sheet-config, .sheet-pericias { display: none; } /* show the selected tab */ .sheet-tabstoggle[value="personagem"] ~ div.sheet-personagem, .sheet-tabstoggle[value="configuration"] ~ div.sheet-config, .sheet-tabstoggle[value="pericias"] ~ div.sheet-pericias { display: block; }
1581079796
Andreas J.
Forum Champion
Sheet Author
Translator
The main problem was this: div { display: flex; } It's the one making things a row. If that part is removed, the section will look like the "No Changes" part, while the "Vantagens" example is how I styled it to look with a few minor changes: I personally try to avoid mixing different display options like flex, block inline-block and so on, and usually only use display:grid for the general sheet layout and then use display:flex for each individual section/box. Here your trouble was caused by having flex in some places, and then parts of the per-defined columns / rows CSS(2colrow, col) making sections display as block, so you had multiple places interfering. My version of the code: <div class='sheet-config'> <div class="2colrow"> <div class="col vantagens"> <label>Vantagens</label> <fieldset class="repeating_vantagens"> <label>Nome</label><input type="text" name='attr_vantagem'> <label>Custo</label><input type="number" name='attr_custo'> <button type='roll' name='roll_AtaqueD' value='&{template:default} {{name=@{vantagem}}}{{@{desc_vant}}}'></button> <br> <label>Descrição</label><textarea style="resize:none" name='attr_desc_vant'></textarea> </fieldset> </div> <div class="col"> <label>No Changes</label> <fieldset class="repeating_vantagens2"> <label>Nome</label> <input type="text" name='attr_vantagem'> <br> <label>Custo</label> <input type="number" name='attr_custo'> <br> <label>Descrição</label> <textarea style="resize:none" name='attr_desc_vant'></textarea> <button type='roll' name='roll_AtaqueD' value='&{template:default} {{name=@{vantagem}}}{{@{desc_vant}}}'></button> <hr> </fieldset> </div> </div> .charsheet { background-color: #ddd; min-width: 800px; } .charsheet label { display: inline-block; width: 75px; text-align: right; } .charsheet input { display: inline-block; width: 165px; } .charsheet input.sheet-short { width: 3.5em; } .charsheet table td, .charsheet table th { font-size: 1.2em; font-weight: bold; text-align: center; } select.sheet-dtype { width: 60px; vertical-align: top; } textarea { resize: vertical; overflow: auto; } /* div { display: flex; } .sheet-personagem, .sheet-config, .sheet-pericias { display: none; }*/ /* show the selected tab */ .sheet-tabstoggle[value="personagem"] ~ div.sheet-personagem, .sheet-tabstoggle[value="configuration"] ~ div.sheet-config, .sheet-tabstoggle[value="pericias"] ~ div.sheet-pericias { display: block; } div.sheet-vantagens .repcontainer label{ width: 45px; }
That worked! Thanks a lot!