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

Need some CSS checkbox move wizardy

1467888740
Havoc
Sheet Author
API Scripter
css:&nbsp; <a href="http://pastebin.com/qMX9450a" rel="nofollow">http://pastebin.com/qMX9450a</a> html:&nbsp; <a href="http://pastebin.com/uTHDGM3q" rel="nofollow">http://pastebin.com/uTHDGM3q</a> I'm coding by making stuff up and seeing if it works, but I don't know how to make this change. I need help here. If anybody got the time and willigness, please.
Your post doesn't adequately explain what you're trying to do.
1467889449

Edited 1467919257
Havoc
Sheet Author
API Scripter
You don't see the image? Here's the link:&nbsp; <a href="http://i.imgur.com/fy9i5VC.png" rel="nofollow">http://i.imgur.com/fy9i5VC.png</a> In short, moving the checkboxes right next to headers with working show/hide trick. EDIT: Nvm, fixed it myself.
I saw the image... it's just not clear what you want.
You sheet-arrow checkboxes are way off to the right because you have "float:right" on it. &nbsp;The float attribute throws the item to the far sides without regard to anything else in the div. &nbsp; Removing that from the checkbox css (both the hide real check box part and the fake checkbox part) will likely mean you will have to line the two back up. Set the &nbsp;"real check box" opacity: 0.7 to make it some what visible Set both the real and fake checkbox to position: relative;&nbsp; Mess around with left and top entries until the two line up. &nbsp;This can take a few minutes. The rest was shown to me by&nbsp; Finderski in the linked post. &nbsp;He might explain it better than I do in the following. &nbsp;Basically, its&nbsp;to have two check boxes with the same name ( name="attr_same_as_the_other_one"). &nbsp;The one you want fight next to "Movement" should be put inside the heading tag, so it is in line and styled some what the same. &nbsp;The check box is place in the same &lt;div&gt;, &lt;table&gt; (and &lt;td&gt; or &lt;th&gt; if inside a table) as what you want to hide. Breaking this down, do this: First, separate your display arrow from the one that hides things. &nbsp;So, change you css from this /* -----Hiding areas with sheet-arrow ----- */ input.sheet-arrow { &nbsp; &nbsp; float: right; } input.sheet-arrow:checked ~ div.sheet-body { &nbsp; &nbsp; display: block; } to this input.sheet-hider:checked ~ div.sheet-body { &nbsp; &nbsp; display: block; } Next, to hide the hidden checkbox, add this to the css sheet-hidden { display:none; } Now, to the html. &nbsp; put the display checkbox inside the heading tag (this might require more messing with the position until its where you want it). &lt;h2 style="text-align: center;"&gt;Movement&lt;input type="checkbox" class="sheet-arrow" name="attr_MovementHide" checked/&gt;&lt;span&gt;&lt;/span&gt;&lt;/h2&gt; Put a second checkbox outside the heading tag, next to what you want to hide, using the "sheet-hidden" and "sheet-hider" class you just made. &lt;input type="checkbox" class="sheet-hider sheet-hidden" name="attr_MovementHide" checked/&gt; It won't show it working on the preveiw pane, but in the game, every time you hit the display checkbox, every other checkbox with the same name also becomes checked. &nbsp;Thus, two checkboxes with the same name can hide/show things is different div's, etc.
1467958001
Havoc
Sheet Author
API Scripter
Thanks for the tips. I already resolved my issue. Yes, I removed the float, changed the hX to a span and gave it my own properties to look like a hX. Fiddled a little with it and boom, it works.