Adv not displayed on desktop, but work on phone

Posted in: Newspaper
Post count: 30

Hello.

I try use code below to display banner on header. But it’s not displayed on desktop. You can see it here: fototips.ru

<div id="rontar_adplace_12172"></div>
<script type="text/javascript"><!--
    (function (w, d, n) {
        var ri = { rontar_site_id: 4165, rontar_adplace_id: 12172, rontar_place_id: 'rontar_adplace_12172', adCode_rootUrl: 'http://adcode.rontar.com/' };
        w[n] = w[n] || [];
        w[n].push(
            ri
        );
        var a = document.createElement('script');
        a.type = 'text/javascript';
        a.async = true;
        a.src = 'http://adcode.rontar.com/rontar2_async.js?rnd=' + Math.round(Math.random() * 100000);
        var b = document.getElementById('rontar_adplace_' + ri.rontar_adplace_id);
        b.parentNode.insertBefore(a, b);
    })(window, document, 'rontar_ads');
//--></script>

If you reduce browser window to 700 px and less – banner is displayed.

I think problem in CSS, but i cant find it. Help me please.

Post count: 30

I found that the problem in this part CSS code

.td-header-sp-recs img,
.td-header-sp-recs .adsbygoogle {
position: absolute;
margin: auto;
top: 0;
bottom: 0;
left: 0;
right: 0;

If I remove

position: absolute;

when banner is works, but the picture is not reduced with the screen

Post count: 30

BUT!! In footer and post – banner does’t work

Post count: 22421

Hello,
In order to use custom ads with our theme, please use this method: https://forum.tagdiv.com/using-other-ads/
Use the div’s provided so the theme can interpret the code as an ad and apply the proper css for it.
Thank you

Post count: 30

Hello Bogdan,
I try to use this code and ADs not visible anyway 🙁

and using this DIVs – i dont see ADs even on mobile version

Post count: 22421

Hi,
Your ad does not work on my end at all so there could be something wrong with the ad itself. Please try to use a standard ad, like the one that comes with the theme:
<div class="td-all-devices"><a href="#"><img src="http://localhost/wordpress/wp-content/uploads/2016/03/rec728.jpg"/></a></div>
If this one works, then it means the theme works as expected and renders ads. You can try your ad in another ad renderer like the adrotate plugin and see if it will work like that. If it does not work even with adrotate, then the ad needs to be checked.
Thanks.

Post count: 30

It works in sidebar, i use widget with Custom Ad – http://fototips.ru/praktika/kak-samostoyatelno-sdelat-kolcevoj-osvetitel/

  • This reply was modified 10 years by tigruz.
Viewing 7 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic.