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

Tab manipulation

1650252355

Edited 1650261784
okay so due to size constraints on the sheet I need my tabs to be in the same space as the content they key too, this is easy enough on it's own with magins, but this puts the tabs behind the content so I'd like the tabs to be brought forward, in addition is there a way to tell CSS that a given vehicle only has a 3 floors and to not show floors 4 & 5? Finally I'd like one of the tabs to be open by default instead of all being closed when opening the sheet
1650263020

Edited 1650263382
Okay I got the possitioning and layering down, but the opacity codes aren't working leaving parts of the tab contents obscured, but I still don't know where to start with the floor options, and for some reason the radio buttons aren't working fixed the radio buttons is it at all possible to make the tabs visible on hover?
1650267185

Edited 1650267328
okay got opacity and position, if I can I'd like to make it so the tabs are only shown while hovering or active, though still transparent, and otherwise invisible (the tabs are in div.tabs), and making it so only a few floors show .navigable-section:not(.active){ display: none !important; } .nav-button.active{ background-color: blue; } div.tabs { position: relative; z-index: 1; opacity: 60%; } div.controls { display: grid; grid-template-columns: 700px; } div.ship-power, div.ship-floor-1, div.ship-floor-2, div.ship-floor-3, div.ship-floor-4, div.ship-floor-5 { border: 1pt solid white; height: 700px; width: 700px; margin-top: -25px; } div.ship-power { background-image: url("<a href="https://i.imgur.com/vAF0Rt6.png" rel="nofollow">https://i.imgur.com/vAF0Rt6.png</a>"); background-repeat: no-repeat; background-size: 700px 700px; display: grid; grid-template-columns: repeat(5, 40px); } div.ship-power div { margin-top: -20px; margin-left: -15px; } input[type="radio"] { appearance: none; border: none; } input[type="radio"] { width: 100px; height: 100px; border-radius: 50% } div.ship-power input[type=radio] { height: 60px; width: 60px; margin-bottom: -8px; } div.speed, div.helm, div.guns, div.shields { position: relative; top: 130px; } div.speed { position: relative; left: 102px; } div.speed input[type="radio"]:checked { background-color: lightgrey; opacity: 60%; } div.OOC { position: relative; top: 271px; left: 167px } div.OOC input[type="radio"]:checked { background-color: blue; opacity: 40%; } div.helm { position: relative; left: 277px } div.helm input[type="radio"]:checked { background-color: yellow; opacity: 50%; } div.guns { position: relative; left: 342px } div.guns input[type="radio"]:checked { background-color: red; opacity: 50%; } div.shields { position: relative; left: 407px } div.shields input[type="radio"]:checked { background-color: green; opacity: 60%; } div.ship-floor-1, div.ship-floor-2, div.ship-floor-3, div.ship-floor-4, div.ship-floor-5 { background-image: url("<a href="https://i.imgur.com/ez6Aliz.png" rel="nofollow">https://i.imgur.com/ez6Aliz.png</a>"); height: 700px; width: 700px; background-repeat: no-repeat; background-size: cover; display: grid; grid-template-columns: 29px repeat(7, 96px); grid-template-rows: 29px repeat(7, 96px); border-collapse: collapse; } div.ship-floor-1 span, div.ship-floor-2 span, div.ship-floor-3 span, div.ship-floor-4 span, div.ship-floor-5 span { border: 1px solid black; }
1650363820

Edited 1650370686
for making the tabs not visible while not in use would this work? &nbsp;got it to work, now I just need to make it so unnecessary tabs don't show .nav-button:not(.active) { display: none; } .nav-button:hover { display: initial; }
1650385011
Andreas J.
Forum Champion
Sheet Author
Translator
great you managed to figure out yourself, and so quickly too This will be a good thread for anyone encountering similar situation with sheet tab implementation :)
1650388355
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Stormborn said: for making the tabs not visible while not in use would this work? &nbsp;got it to work, now I just need to make it so unnecessary tabs don't show .nav-button:not(.active) { display: none; } .nav-button:hover { display: initial; } I'd recommend using visibility instead of display:none. &nbsp;telling it to display none will make it so you can't ever hover over the item. If you just want it to not be visible, but still be interactable, then you want the visibility keyword instead.
Scott C. said: Stormborn said: for making the tabs not visible while not in use would this work? &nbsp;got it to work, now I just need to make it so unnecessary tabs don't show .nav-button:not(.active) { display: none; } .nav-button:hover { display: initial; } I'd recommend using visibility instead of display:none. &nbsp;telling it to display none will make it so you can't ever hover over the item. If you just want it to not be visible, but still be interactable, then you want the visibility keyword instead. I got it working with this, div.tabs holds all the tabs so I can position them better in relation to everything else .nav-button:not(.active) { opacity: 0%; } .nav-button:hover { opacity: 100%; } div.tabs { position: relative; z-index: 1; opacity: 60%; } but this bit of code does do something I want if a less then ideal way, I'd like this bit of code to ask me how many tabs to hide, that way I can have a 3 floor ship and have floors 4 &amp; 5 not confuse players, I think that'd be Jquery which I am less then qualified to code up .nav-button:not(.active) { display: none; }