title: How to select a div inside another element when a checkbox input is checked?
body: <p>I have a checkbox that I need when it's checked to show a div inside another element (not next to the checkbox it's inside a div that is next to it's parent)</p>
  
  <pre><code> &lt;nav&gt;
     &lt;div class='container'&gt;
       &lt;label class="tog" for="toggle"&gt;&amp;#9776;&lt;/label&gt;
       &lt;input type="checkbox" id="toggle"&gt;&lt;/input&gt; //This is the checkbox
     &lt;/div&gt;
   &lt;/nav&gt;
   &lt;div class='container'&gt;
     &lt;div class='select'&gt; // This is the div that I want to select when checkbox is checked
     &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>I tried these selectors but didn't work:</p>
  
  <pre><code>#toggle:checked   ~ .select{display:block}
  #toggle:checked   + .select{display:block}
  </code></pre>