Forum Moderators: not2easy

Message Too Old, No Replies

Fixed footer that's Adsense compliant

         

csdude55

8:13 am on Apr 30, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It's my understand that Adsense doesn't approve of an ad being hidden behind another layer. So with that in mind...

On tablets and mobile devices, I'm showing locally-sold ads using a simply:

position: fixed;
left: 0;
bottom: 0;
height: 50px;
width: 100%;
background: #999;
z-index: 10000;


I want the locally-sold ad (NOT the Adsense banner) to stay fixed on the bottom of the viewport while the user scrolls up and down. But I also have 728x90 (tablets) or 300x50 (mobile) Adsense banners that will scroll with the page, and I have to worry that them scrolling behind the local ad will be a violation.

If that's true, what's a smart way to accomplish this without violating Adsense policies?

not2easy

3:22 pm on Apr 30, 2017 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Does the AdSense container scroll to the "bottom: 0;" position or is it scrolling within the main container? I ask because the fixed-bottom position can be outside the footer and show in the same place. Or you could change the z-index to "-2" or assign the z-index of the AdSense ad to "11000".


csdude55

9:08 pm on Apr 30, 2017 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The Adsense container doesn't have any positioning set, so it's just at the default position: static. The mobile and tablet Adsense containers are nested within the HTML5 <main></main> tag, and the local ad is at the very bottom of the <footer></footer> tag.

I could easily set the Adsense containers to position: relative and give them a z-index: 11000, so that when the user scrolls at one point the layers would be:

MAIN
LOCAL
ADSENSE

It would look kinda weird, though, I think. And would Adsense be OK with that, or would they consider that to be calling attention to the Adsense banner?