title: Css media query - default style doesn't apply when condition fail
body: <p>I have media query for max-width, so when the user resize the browser, the design will be responsive. The problem is that when the user returns back to the original browser size, the design will left little bit messed, it doesn't return to the inital position. When i reload the page, everything is fine. I thought that no media query rules should be applied when the condition isn't met and just default css should be applied?</p>
  
  <p><strong>Before resize:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/32geK.png" alt="before resize "></p>
  
  <p><strong>When resized:</strong></p>
  
  <p><img src="https://i.stack.imgur.com/IUSF3.png" alt="after resize"></p>
  
  <p><strong>After resize back:</strong>
  <img src="https://i.stack.imgur.com/esNzT.png" alt="after resize back"></p>
  
  <pre><code>.nav-main-link {
      display: inline-block;
      border-right: 1px solid black;
      min-height: 50px;
  }
  
  #nav-main-search {
      float: right;
      margin-top: 10px;
      margin-right: 10px;
  }
  
  #nav-main-search .search-input {
      border-radius: 5px 0px 0px 5px;
      width: 225px;
      font-size: 1.0em;
      box-sizing: border-box;
      padding: 2px 0px 0px 10px;
      height: 2em;
  }
  
  @media (max-width: 600px) {
  
      .nav-main-link {
          display: block;
          border-bottom: 1px solid white;
          border-right: 0;
      }
  
      #nav-main-search {
          float: none;
          position: relative;
          padding-bottom: 10px;
          padding-left: 10px;
          padding-right: 50px; 
      }
  
      #nav-main-search .search-input {
          display: block;
          width: 100%;
      }   
  
          #nav-main-search button[type="submit"]{
          position: absolute;
          top: 0px;
          right: 0px;
      }
  
  }
  </code></pre>
  
  <p>EDIT: added jsfiddle demo
  DEMO: <a href="https://jsfiddle.net/qtenuuhv/" rel="nofollow noreferrer">https://jsfiddle.net/qtenuuhv/</a></p>