Welcome to WebmasterWorld Guest from 54.224.5.186

Forum Moderators: incrediBILL & martinibuster

Adsense in divs that don't display on some screen sizes

     
8:03 am on May 18, 2017 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator ianturner is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 19, 2001
posts: 3597
votes: 35


I'm looking to go fully responsive with my design layout (rather than responsive with server side assist)

This is causing a problem with my right floated ads as they are not shown on mobile devices. Is it okay to have these in a div that doesn't display on mobile? Or is there another solution to allow these ads to just display on desktop.
10:00 am on May 18, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:May 11, 2015
posts:174
votes: 57


If you're on wordpress I can highly recommend the plugin called AmpedSense. Does exactly that
10:39 am on May 18, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:Apr 20, 2017
posts:123
votes: 13


In javascript , I test the screen width to select which code to insert (or not).
11:51 am on May 18, 2017 (gmt 0)

Moderator from GB 

WebmasterWorld Administrator ianturner is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 19, 2001
posts: 3597
votes: 35


JavaScript will work but isn't perfect when display width changes - such as the portrait to landscape change on most mobiles/tablets
2:30 pm on May 18, 2017 (gmt 0)

Preferred Member from ES 

10+ Year Member Top Contributors Of The Month

joined:Mar 4, 2003
posts: 469
votes: 4


If you are using responsive ads, you can set them to not show on certain screen sizes with a media query.
6:11 pm on May 18, 2017 (gmt 0)

New User

joined:Nov 15, 2015
posts: 26
votes: 1


Yep, as denisl says, CSS media queries are the way to go .... recommended by Google too, here's the Google support page on media queries and adsense

[support.google.com ]

(Hope the link is OK, mods?)
5:02 pm on May 20, 2017 (gmt 0)

Junior Member

Top Contributors Of The Month

joined:May 11, 2015
posts:174
votes: 57


jbnz has the solution, just tried on my responsive ads
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members