R
R
raft882017-11-02 03:37:37
JavaScript
raft88, 2017-11-02 03:37:37

Why is the Adsense block not displayed on a smartphone?

Hey!
I can't figure out why the ad block code is not displayed on smartphones:

<style>
    .class_name { width: 336px; height: 280px; }
    @media(min-width: 580px) { .class_name { width: 580px; height: 400px; } }
</style>
<div style="display: block; margin: 5px 0;">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Netboard -->
<ins class="adsbygoogle class_name"
data-ad-client="ca-pub-XXXXXXXXXXXXX"
data-ad-slot="XXXXXXXXXXX"</ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>

At the same time, it works perfectly on the desktop - at high resolution it is displayed in sizes of 580x400, when the browser page is reloaded with a minimum width, 336x280 is loaded. On any smartphone, the block is not loaded at all. What can be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Johnny Smith, 2017-11-02
@Olek1

Maybe you need to wait, I had similar problems with him for a long time, I waited, then everything appeared, about mobile phones, maybe the same thing?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question