This topic has 2 replies, 2 voices, and was last updated 10 years by aztlanla.

  • Author
  • #6375
     aztlanla
    Participant

    Hi, I have two large banners on my site that are 728×90. When I look at my site with my mobile phone, the site is squished. The banners run across the screen past the web page. The banners are on whitespace. The web site is using about half the screen, but the banner goes across the whole screen. ow can I make the banners mobile compliant.

    Thanks

    #6376
     JohnDoe
    Participant

    try to show them on screen only with media queries?

    #6468
     aztlanla
    Participant

    I got it to work using the code below, now the banners resize when on mobile site.

    COPY CODE
    
    <center>
    <style type="text/css">
    .adslot_1 { width: 320px; height: 50px; }
    @media (min-width:500px) { .adslot_1 { width: 468px; height: 60px; } }
    @media (min-width:800px) { .adslot_1 { width: 728px; height: 90px; } }
    </style>
    
    <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <ins class="adsbygoogle adslot_1" style="display:inline-block;" data-ad-client="ca-pub-123456" data-ad-slot="123456"></ins>
    <script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
    </center>
    

    Don’t forget to change the ca-pub and ad-slot.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?