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

[SW - EotE] Chrome displaying radio box css properly but firefox is not

Hey everyone. I'm currently modifying the Star Wars: Edge of the Empire sheet to better suit the needs of my group. One of the modifications I'm making is to the style of the tabs at the top of each sheet to reach the different pages of it. The code I'm using is working fine in Chrome but in Firefox I get just blank radio boxes. Anybody have any idea why this would be? Code/Screenshots below.     <input type="radio" name="attr_sheet" class="sheet-tab sheet-tab-character" value="1" title="Character" checked="checked" />    <input type="radio" name="attr_sheet" class="sheet-tab sheet-tab-skills"value="2" title="Skills" />  (and so on) input.sheet-tab { width: 150px; height: 20px; position: relative; top: 5px; left: 6px; margin: -1.5px; cursor: pointer; z-index: 1; display:inline-block; } input.sheet-tab::before { content: attr(title); border: solid 1px #a8a8a8; border-bottom-color: black; text-align: center; display: inline-block; width: 150px; height: 20px; font-size: 18px; background: #dcdcdc; } Chrome: Firefox
1439082213
Diana P
Pro
Sheet Author
IIRC, to get it to work correctly in FF, I had to put a span after it like:     <input type="radio" name="attr_tab" class="sheet-tab sheet-tab1" value="1" title="Stats" checked="checked" />         <span class="sheet-tab sheet-tab1">Stats</span>     <input type="radio" name="attr_tab" class="sheet-tab sheet-tab2" value="2" title="Weapons" />         <span class="sheet-tab sheet-tab2">Weapons</span> I believe I also changed my CSS but not certain which part was the change to get it to work; my CSS looks like: /* Fake tabs style1 (reskinned radio button; fixed to work properly in firefox */ 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, input.sheet-tab7:checked ~ div.sheet-tab7, input.sheet-tab8:checked ~ div.sheet-tab8, input.sheet-tab9:checked ~ div.sheet-tab9, input.sheet-tab10:checked ~ div.sheet-tab10, input.sheet-tab99:checked ~ div.sheet-tab99 {     display: block; } input.sheet-tab {     width: 70px;     height: 20px;     position: relative;     top: 5px;     left: 6px;     margin: -1.5px;     cursor: pointer;     opacity: 0;     z-index: 9999; } span.sheet-tab {     text-align: center;     display: inline-block;     font-size: 13px;     background: white;     color: gray;     font-weight: bold;     width: 70px;     height: 20px;     cursor: pointer;     position: relative;     margin-left: -75px; } input.sheet-tab::before {     content: attr(title);     border: solid 1px #a8a8a8;     border-bottom-color: black;     text-align: center;     display: inline-block;          background: #fff;     background: -moz-linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);     background: -webkit-linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);     background: -ms-linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);     background: -o-linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);     background: linear-gradient(to top, #c8c8c8, #fff, #c8c8c8);          width: 50px;     height: 20px;     font-size: 18px; } input.sheet-tab:checked::before {     background: #dcdcdc;     background: -moz-linear-gradient(to top, #fcfcfc, #dcdcdc, #fcfcfc);     background: -webkit-linear-gradient(to top, #fcfcfc, #dcdcdc, #fcfcfc);     background: -ms-linear-gradient(to top, #fcfcfc, #dcdcdc, #fcfcfc);     background: -o-linear-gradient(to top, #fcfcfc, #dcdcdc, #fcfcfc);     background: linear-gradient(to top, #fcfcfc, #dcdcdc, #fcfcfc);     border-bottom-color: #fff; } input.sheet-tab:not(:first-child)::before {     border-left: none; } div.sheet-tab-content {     border: 1px solid #a8a8a8;     border-top-color: #000;     margin: 2px 0 0 5px;     padding: 5px; }
Cool, I'll give this a try later this week and see if it does it. I'll let you know, thanks!
1439348313

Edited 1439348409
Josh A.
Sheet Author
I was able to get it working with your method. Also, I figured out how to change the appearance of the selected tab even in firefox. input.sheet-tab:checked + span { } That will style the span that comes directly after the checked checkbox (basically the label for that checkbox in your above example)
1439348724
Diana P
Pro
Sheet Author
Cool!  Glad you got it working!  (and oops,  I had the input.sheet-tab:checked + span in my .css code but it was in another section so I missed it.  Guess I should move it so things are grouped properly.  Sorry about missing that.)
Haha, no problem - luckily it didn't take me long to figure that part out. Thanks for the tip!