Disable media css

Original by reinie, 2016 

This summary note was Posted on

There are several ways:

With CSS

  • Add a class to your or such as class="force-desktop"
  • Add the following css

@media () { body:not(.force-desktop) { //styles } }

With Javascript

Using the viewport property (only on mobile devices, not recognised by desktop browsers)

   $('meta[name="viewport"]').prop('content', 'width=1440');

Javascript and css

  • Out css you want to disable in a separate css file
  • and disable/able the css file with javascript as you need towitht he following:
function toggleSheet(title){
  var S=document.styleSheets, L=S.length, temp;
    return temp;

Source: Stackoverflow forum