title: Make Element Appear On Minimum Screen Size
body: <p>I have a bug in my header when I shrink the screen size down. The nav is supposed to disappear (only to reappear if the mobile nav icon is clicked,) which is working fine.  However, if I click the mobile nav icon, and then click it again to hide it, the nav stays hidden even when I expand the screen size out again.</p>
  
  <p>I want the nav to show up again when the screen gets to 670px.</p>
  
  <p>CSS</p>
  
  <pre><code>@media screen and (min-width: 671px) {
  .nav {
      display: block;
      }   
  }
  
  @media screen and (max-width: 670px) {
  .navicon {
      display: block;   
  }
  .homeiconcontainers {
      float: none;
      width: 100%;
  }
  .header {
      background: none;
      opacity: 1;
  }
  .pagelinkcontainers {
      float: none;
      line-height: 50px;
      background-color: black;
      width: 200px;
      padding-right: 0px;
      text-align: center;
  }
  ul {
      padding-left: 20px; 
  }
  .nav {
      display: none;
  }   
  }
  </code></pre>
  
  <p>JavaScript</p>
  
  <pre><code>// Show Mobile Navbar Onclick
  
  function MobileMenu (object) {
  
  var elements={"nav":{title: "nav"}};
  var mobiledisplay = window.getComputedStyle(document.getElementById("nav")).display;
  
  //Show nav element
  for(var nav in elements) {
  
      if(object!==nav) {
  
          document.getElementById(nav).style.display='none';
      }
      if(object==nav &amp;&amp; mobiledisplay=='block') {
  
          document.getElementById(nav).style.display='none';   
      }
      else {
  
          document.getElementById(nav).style.display='block';
          location.hash=pages[nav].title;
          document.title=pages[nav].title;
      }
  }
  }
  </code></pre>
  
  <p>My <code>.nav</code> is somehow getting <code>display: none</code> from either my 670px media query, or  from the javascript function.  I could also be mis-using the <code>min-width</code> media query, but I'm not sure.</p>
  
  <p>Im assuming you don't need to see my HTML to figure this out, but if you would like to, let me know.</p>