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

Checkbox taking space that doesn't belong to it.

As the title says, I've a checkbox problem. It is set up here: But even all the way outside its table, over here: It's still saying that I'm pressing the checkbox. On a rare occasion, I can actually hit the +Add button, but then I can't get rid of it if I press modify since the checkbox is so large. Here is all of my CSS for the checkbox: input[type="checkbox"] + span::before {     content: "";     width: 14px;     height: 14px;     font-size: 12px;          -moz-border-radius: 3px;     -webkit-border-radius: 3px;     border-radius: 3px; } input[type="checkbox"]:checked + span::before {     content: "✓"; } input[type="radio"] + span::before, input[type="checkbox"] + span::before {     margin-right: 4px;     border: solid 1px #a8a8a8;     line-height: 14px;     text-align: center;     display: inline-block;     vertical-align: middle;          -moz-box-shadow: 0 0 2px #ccc;     -webkit-box-shadow: 0 0 2px #ccc;     box-shadow: 0 0 2px #ccc;          background: #f6f6f6;     background: -moz-radial-gradient(#f6f6f6, #dfdfdf);     background: -webkit-radial-gradient(#f6f6f6, #dfdfdf);     background: -ms-radial-gradient(#f6f6f6, #dfdfdf);     background: -o-radial-gradient(#f6f6f6, #dfdfdf);     background: radial-gradient(#f6f6f6, #dfdfdf); } input[type="radio"], input[type="checkbox"] {     opacity: 0;     width: 120;     height: 30px;     position: absolute;     cursor: pointer;     z-index: 1; } If anyone can spot the error, I will bake you internet cookies. I'm between paydays so you get pumpkin shortbread cookies. :)
1477671340

Edited 1477671372
vÍnce
Pro
Sheet Author
Without your html it's hard to tell, but from your images I would say you need to move your hidden checkbox over using some negative margin-left.
1477675979

Edited 1477676108
[Deleted]
Sheet Author
<div class="sheet-tab-content sheet-section-proficiencies"><h4><b>Skills and Talents</b></h4>          <div class="body">         <div class="sheet-2colrow">             <div class="sheet-col"> <h4><b>Proficiencies and Languages</b></h4><br>     <h4><b>Weapon Proficiencies</b></h4><br>     <table>     <tr>             <td style="background-color: #00004B; color: #FFF; font-family: Arial; font-weight: bold;">Weapon</td>             <td style="background-color: #00004B; color: #FFF; font-family: Arial; font-weight: bold;">Slots</td>             <td style="background-color: #00004B; color: #FFF; font-family: Arial; font-weight: bold;">Ex</td>             <td style="background-color: #00004B; color: #FFF; font-family: Arial; font-weight: bold;">Sp</td>             <td style="background-color: #00004B; color: #FFF; font-family: Arial; font-weight: bold;">M</td>             <td style="background-color: #00004B; color: #FFF; font-family: Arial; font-weight: bold;">HM</td>             <td style="background-color: #00004B; color: #FFF; font-family: Arial; font-weight: bold;">GM</td>             <td style="background-color: #00004B; color: #FFF; font-family: Arial; font-weight: bold;">CW</td>     </tr>     <tr>             <td><input type="text" name="attr_weapprofname" title="@{weaponprofname}" class="sheet-middle" placeholder="Name of Weapon Prof"></td>             <td><input type="text" name="attr_weapprofnum" title="@{weapprofnum}" class="sheet-short" placeholder="Slots"></td>             <td> <input type="checkbox" name="attr_expert" title="@{expert}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_specialist" title="@{specialist}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_mastery" title="@{mastery}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_high-mastery" title="@{high-mastery}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_grand-mastery" title="@{grand-mastery}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_chosen-weapon" title="@{chosen-weapon}" value="1" /><span></span></td>     </tr>     </table>     <fieldset name="repeating_weaponprofs" title="@{weaponprofs}" class="repeating_weaponprofs"><table>     <tr>             <td><input type="text" name="attr_weapprofname" title="@{weaponprofname}" class="sheet-middle" placeholder="Name of Weapon Prof"></td>             <td><input type="text" name="attr_weapprofnum" title="@{weapprofnum}" class="sheet-short" placeholder="Slots"></td>             <td> <input type="checkbox" name="attr_expert" title="@{expert}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_specialist" title="@{specialist}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_mastery" title="@{mastery}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_high-mastery" title="@{high-mastery}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_grand-mastery" title="@{grand-mastery}" value="1" /><span></span></td>             <td> <input type="checkbox" name="attr_chosen-weapon" title="@{chosen-weapon}" value="1" /><span></span></td>     </tr> </table></fieldset>     <br>     <h4><b>Traits</b></h4><br>     <fieldset name="repeating_traits" title="@{traits}" class="repeating_traits"><table>     <tr>             <td><input type="text" name="attr_traitname" title="@{traitname}" placeholder="Name of Trait"></td>         <td><input type="text" name="attr_traitstatnum" title="@{traitstatnum}" class="sheet-short"></td>             <td style="color: #FFF; font-family: Arial; font-weight: bold;">±<input type="text" name="attr_traitmod" title="@{traitmod}" value="0" class="sheet-short">             <button type="roll" name="roll_Trait" title="@{Trait}" value="/roll [[1d20cs<1]]<[[(@{traitstatnum})+(@{traitmod})]] @{traitname}"></button></td>     </tr>     </table></fieldset>     <br><br>     <h4><b>Disadvantages</b></h4><br>     <fieldset name="repeating_disads" title="@{disads}" class="repeating_disads"><table>     <tr>             <td><input type="text" name="attr_disadname" title="@{disadname}" placeholder="Name of Disadvantage"></td>         <td><input type="text" name="attr_disadstatnum" title="@{disadstatnum}" class="sheet-short"></td>             <td style="color: #FFF; font-family: Arial; font-weight: bold;">±<input type="text" name="attr_disadmod" title="@{disadmod}" value="0" class="sheet-short">             <button type="roll" name="roll_Disad" title="@{Disad}" value="/roll [[1d20cs<1]]<[[(@{disadstatnum})+(@{disadmod})]] @{disadname}"></button></td>     </tr>     </table></fieldset> </div> <div class="sheet-col">     <br><br>     <h4><b>Non-Weapon Proficiencies</b></h4><br>     <fieldset name="repeating_profs" title="@{profs}" class="repeating_profs"><table>     <tr>             <td><input type="text" name="attr_profname" title="@{profname}" placeholder="Name of NWP"></td>         <td><input type="text" name="attr_profstatnum" title="@{profstatnum}" class="sheet-short"></td>             <td style="color: #FFF; font-family: Arial; font-weight: bold;">±<input type="text" name="attr_profmod" title="@{profmod}" value="0" class="sheet-short"><input type="number" name="attr_profslots" title="@{profslots}" class="sheet-short" placeholder="#">             <button type="roll" name="roll_Prof" title="@{Prof}" value="/roll [[1d20cs<1]]<[[(@{profstatnum})+(@{profmod})]] @{profname}"></button></td>     </tr> </table></fieldset>     <br><br>     <h4><b>Languages</b></h4><br>     <fieldset name="repeating_langs" title="@{langs}" class="repeating_langs"><table>     <tr>             <td><input type="text" name="attr_langname" title="@{langname}" placeholder="Name of Language"></td>             <td> <input type="checkbox" name="attr_lang-rw" title="@{lang-rw}" value="1" /><span></span></td>     </tr> </table></fieldset>     </div> </div><hr></div> </div> So, that's the section. I tried the margin-left: - but it just moves the checkboxes into the text area. The selection field is just as wide as ever though. I'm wondering if there may be a way to define a buffer between sheet-col 's to prevent this. Edit: Found the problem. I was using margin-left on the wrong thing. I got it working. Thanks Vince :)
1477677024
vÍnce
Pro
Sheet Author
Cool beans
1477720622

Edited 1477720638
Lithl
Pro
Sheet Author
API Scripter
When using styled checkboxes/radio buttons, I find it exceptionally useful to set opacity: 0.5 (instead of 0) in order to debug where the actual checkbox is. You can also use the DOM inspector of your browser, but that will just give you the element's outline on hover over the element in the code. Giving it a nonzero opacity will let you see where it is while doing other things.