I've made a CSS grid container layout but I'm unable to swap the visible contents of a particular section of the grid. My original thought was it might be the CSS conflicting but when I isolated the content and put a single &lt;div&gt; tag around it, it vanished. Is there a way to make hidden content that's nested inside of a div element? HTML &lt;!-- radio button test --&gt; &lt;input type="radio" name="attr_weapon_type" value="1" class="sheet-selected1" checked&gt; &lt;input type="radio" name="attr_weapon_type" value="2" class="sheet-selected2"&gt; &lt;!-- the two div boxes in question, putting a single div element around these two elements makes them dissapear as well --&gt; &lt;div class="sheet-weapon_smg-Container sheet-tab-content sheet-tab2"style="background-position:25px 20px; background-size: 520px;"&gt; bbbbbbbbbbbbbbbbbb &lt;/div&gt; &lt;div class="sheet-weapon_rifle-Container sheet-tab-content sheet-tab1"style="background-position:25px 20px; background-size: 520px;"&gt; aaaaaaaaaaaaaaaaaa &lt;/div&gt; &lt;h1&gt;Rifle Grid&lt;/h1&gt; &lt;div class="sheet-grid-container"&gt; &lt;div class="combat-item1"&gt;attack&lt;/div&gt; &lt;div class="combat-item2"&gt;overwatch&lt;/div&gt; &lt;div class="combat-item3"&gt;suppress&lt;/div&gt; &lt;div class="combat-item4"&gt;throwable&lt;/div&gt; &lt;div class="combat-item5"&gt;reload&lt;/div&gt; &lt;div class="combat-item6"&gt;health&lt;/div&gt; &lt;div class="combat-item7"&gt;cover_m&lt;/div&gt; &lt;div class="combat-item8"&gt;type_w&lt;br&gt; &lt;br&gt; &lt;select class="sheet-weaponOption" name="attr_weapon_type"&gt; &lt;option value="1"&gt; Rifle &lt;/option&gt; &lt;option value="2"&gt; SMG &lt;/option&gt; &lt;/select&gt;&lt;/div&gt; &lt;div class="combat-item9"&gt;bonuses&lt;/div&gt; &lt;div class="combat-item10"&gt;swap&lt;/div&gt; &lt;div class="combat-item11" style="align-content: center;"&gt; &lt;!-- when placed in this div element it is no longer visible --&gt; &lt;/div&gt; &lt;div class="combat-item12"&gt;heal&lt;/div&gt; &lt;div class="combat-item13"&gt;scan&lt;/div&gt; &lt;div class="combat-item14"&gt;intimidate&lt;/div&gt; &lt;div class="combat-item15"&gt;standing&lt;/div&gt; &lt;div class="combat-item16"&gt;prone&lt;/div&gt; &lt;div class="combat-item17"&gt;abilities&lt;/div&gt; &lt;div class="combat-item18"&gt;ability_1&lt;/div&gt; &lt;div class="combat-item19"&gt;ability_2&lt;/div&gt; &lt;div class="combat-item20"&gt;ability_3&lt;/div&gt; &lt;div class="combat-item21"&gt;ability_4&lt;/div&gt; &lt;/div&gt; CSS div.sheet-tab-content { display: none; } input.sheet-selected1:checked ~ div.sheet-tab1, input.sheet-selected2:checked ~ div.sheet-tab2 { display: block; } .sheet-hidden { display: none; } .sheet-hider:not(:checked) + div { display: none; } .sheet-grid-container { display: grid; grid-gap: 5px; background-color: rgba(0, 255, 0, 0.2); padding: 10px; grid-template-columns: 100px 100px 100px 100px 100px 100px 100px 100px 100px; grid-template-rows: 80px 80px 80px 80px 80px 80px; grid-template-areas: "attack attack overwatch suppress throwable reload reload health cover_m" "type_w type_w bonuses bonuses bonuses swap swap health cover_m" "weapon weapon weapon weapon weapon weapon weapon heal scan" "weapon weapon weapon weapon weapon weapon weapon heal intimidate" "weapon weapon weapon weapon weapon weapon weapon standing prone" "abilities ability_1 ability_1 ability_2 ability_2 ability_3 ability_3 ability_4 ability_4"; } .sheet-grid-container &gt; div { background-color: rgba(255, 255, 255, 0.2); text-align: center; padding: 0px 0; font-size: 1em; } .sheet-combat-item1 { grid-area: attack; } .sheet-combat-item2 { grid-area: overwatch; } .sheet-combat-item3 { grid-area: suppress; } .sheet-combat-item4 { grid-area: throwable; } .sheet-combat-item5 { grid-area: reload; } .sheet-combat-item6 { grid-area: health; } .sheet-combat-item7 { grid-area: cover_m; } .sheet-combat-item8 { grid-area: type_w; } .sheet-combat-item9 { grid-area: bonuses; } .sheet-combat-item10 { grid-area: swap; } .sheet-combat-item11 { grid-area: weapon; } .sheet-combat-item12 { grid-area: heal; } .sheet-combat-item13 { grid-area: scan; } .sheet-combat-item14 { grid-area: intimidate; } .sheet-combat-item15 { grid-area: standing; } .sheet-combat-item16 { grid-area: prone; } .sheet-combat-item17 { grid-area: abilities; } .sheet-combat-item18 { grid-area: ability_1; } .sheet-combat-item19 { grid-area: ability_2; } .sheet-combat-item20 { grid-area: ability_3; } .sheet-combat-item21 { grid-area: ability_4; } /*-----------------------Rifle-----------------------*/ .sheet-weapon_rifle-Container{ background-image: url('<a href="https://i.imgur.com/kQEdjib.png" rel="nofollow">https://i.imgur.com/kQEdjib.png</a>'); width: 720px; height: 240px; background-repeat: no-repeat; background-attachment: scroll; background-size: contain; display: grid; grid-gap: 5px; background-color: rgba(0, 0, 255, 0.5); padding: 5px; background-position: center; } .sheet-weapon_rifle-Container &gt; div { background-color: rgba(255, 255, 255, 0.2); text-align: center; padding: 0px; font-size: 1em; } .sheet-weaponOption { border-radius:20px; height: 30px; width: 160px; background: rgba(256,256,256,0.55); } /*-----------------------Rifle-----------------------*/ .sheet-weapon_smg-Container{ background-image: url('<a href="https://i.imgur.com/RTTnir8.png" rel="nofollow">https://i.imgur.com/RTTnir8.png</a>'); width: 720px; height: 240px; background-repeat: no-repeat; background-attachment: scroll; background-size: contain; display: grid; grid-gap: 5px; background-color: rgba(0, 0, 255, 0.5); padding: 5px; background-position: center; } .sheet-weapon_smg-Container &gt; div { background-color: rgba(255, 255, 255, 0.2); text-align: center; padding: 0px; font-size: 1em; }