title: "Show full site" button to bypass css media queries
body: <p>I'm using css media queries on my website to switch to a more vertical layout on smaller devices. This works quite well, but I'd like to add a button on the site with something like &quot;Show desktop version&quot;. I want to make this button (or link, whatever) force or alter the media query evaluations so they evaluate as if the screen width was bigger than it is (e.g. 1200px instead of 320px). Is this possible?</p>
  <p>My css looks like this:</p>
  <pre><code>#logo {
      /* Mobile style */
      [...]
      
      @media (min-width: @screen-sm) {
          /* Desktop style */
          [...]
      }
  }
  
  #footer {
      /* Mobile style */
      [...]
      
      @media (min-width: @screen-sm) {
          /* Desktop style */
          [...]
      }
  }
  
  /* And so on... i.e. multiple piecewise styles, following the same pattern used in Bootstrap's css */
  </code></pre>
  <p>I found this interesting approach which uses a css class on the body instead of media queries to switch between layouts. However, it completely does away with the actual media queries and uses javascript instead.
  <a href="https://stackoverflow.com/questions/11417307/full-web-mobile-browsers-and-screen-size-media-queries-based">&quot;Full web&quot; mobile browsers and screen-size media queries based</a></p>
  <h2>edit</h2>
  <p>Refined the css example. The first 2 answers are very helpful, but I'd rather not have to completely modify the css organization to separate at the root desktop and mobile versions. One more interesting technique:
  <a href="https://stackoverflow.com/questions/13843858/less-can-you-group-a-css-selector-with-a-media-query">LESS: Can you group a CSS selector with a media query?</a></p>
  <h2>edit 2</h2>
  <p>An interesting approach is to modify the css media queries via javascript. It scares me a bit though because browser support might be unreliable for an such an obscure technique:
  <a href="http://jonhiggins.co.uk/words/max-device-width/" rel="nofollow noreferrer">http://jonhiggins.co.uk/words/max-device-width/</a></p>