Recent Topics

Adsense showing up on sidebar on mobile, but not pc?

Started by on Sep 24, 2017 – Contents updated: Oct 06, 2017

Sep 24, 2017 22:43    

I have placed the adsense code in sidebar using sidebar 2 (Free HTML), does not work on pages when viewing on my PC, but checked with my cellphone and is working fine?
I also am trying to place in the header using the Ads (Adsense-Plugin), with nothing appearing at all on both except what I named it (Ads) showing? I left the red box there around the code so I could see where it is supposed to show up, on the coincidence blog only https://imagewatchdog.com/index.php/a/ , The rest of the site, i left the border off.
I am almost sure I have done everything right, just a little dumbfounded.
I just updated to the 6.9.3. Stable version.
Website is www.imagewatchdog.com
Thanks

Sep 25, 2017 07:43

@imagewatchdog I'm not able to reproduce this right now, but it's seem that you're getting an error in the browser's console (see screenshot below).

Try replacing width:150px; by width:250px; in your ad sense block. I will keep trying to reproduce the issue and get back to you with more info.

Regards!

Sep 25, 2017 15:12

Like I said in the first post, I only left that there on that blog only, to show where the ads are supposed to be. The rest of the site does not have that red square, just the adsense code. That still would not explain why the ad is showing up on my cellphone, but not on my PC?

Sep 25, 2017 15:17

OK, made it 250, didn't work. Made it 500, it works? So I guess I need that box around the adsense code?
Thanks
I'll get back to you if I have any more issues.

Sep 27, 2017 07:17

@imagewatchdog Adsense is a bit tricky to be tested on local sites, so I spent some time trying to figure out before to find it. At the end, I came across the same answer that you did, so I guess that setting a width to the parent div is ok.

What I would recommend is use a percentage based width, maybe something like:

<div style="float:right; clear:both; margin:5px; min-width:100%;">

That would help to display the ad correctly on mobiles (see screenshot below).

Also, you could get rid of the extra div you created before to display the red border. Adding styles to the parent div (the one before "<!-- Paste from here... -->") is ok, however this is just a cosmetic change, of course.

Regards!

Oct 06, 2017 14:05

Thanks again for your speedy responses. I am about to go in and change the code to the percentage, makes sense now, when you look at it.


Form is loading...

free blog software – This forum is powered by b2evolution CMS, a complete engine for your website.