title: How to show responsive adsense ads only on mobiles devices
body: <p>I am looking for a correct implementation method to display/hide my adsense ads on mobile and desktops.</p>
  
  <p>Right now I am using this current method which gives us 2 console errors.</p>
  
  <p>The current method is:</p>
  
  <p>We use 2 classes "mobileShow" and "mobileno" to tag the ads accordingly to where we want to show them.</p>
  
  <p>So if we want the responsive adsense code to be shown on mobiles we use mobileshow if we want to hide the big rectangular ads from mobiles we use mobileno.</p>
  
  <p>The code we are using is the following:</p>
  
  <pre><code>.mobileShow {display: none;}
  .mobileShow {display: inline;}
     @media only screen
     and (min-device-width : 320px)
     and (max-device-width : 480px)
  
  .mobileno{display:none;}
     @media (max-width: 767px)
  </code></pre>
  
  <p>As far as we know google adsense policy allows display:none if it is for a usage like implementing responsive layouts.</p>
  
  <p>Our problem is the we receive the following error 2 times in the chrome development console:</p>
  
  <p>2 x <strong>Uncaught Error: Cannot find a responsive size for a container of width=0px and data-ad-format=auto adsbygoogle.js:41</strong></p>
  
  <p>We have tested several times we know that is something wrong with the above code.</p>
  
  <p>We are looking a way to implement the current "solution" with no errors.</p>
  
  <p>We would be very grateful if someone helps us out.</p>