luky
luky

Reputation: 2370

Adsense top anchor ad vs fixed Navbar

if i have fixed Navbar on the site, the Adsense appears over the top bar which is incorrect, if i have position relative the anchor ad appears above it, how to fix it?

Upvotes: 1

Views: 446

Answers (1)

usaidr
usaidr

Reputation: 11

Adsense has given a code to disable anchor ad from the top of your website and display it at the bottom. However, this code did not work for me.

from Disable anchor ads at the top of your page

Example

<head>
<script async 
src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js? 
client=ca-pub-1234567890123456" crossorigin="anonymous"></script>
<script>
  (adsbygoogle = window.adsbygoogle || []).push({
    google_ad_client: "ca-pub-1234567890123456",
    enable_page_level_ads: true,
    overlays: {bottom: true}
  });
</script>
</head>

Note: If you're using the AdSense code, you'll need to replace your ad code with the old Auto ads code shown in this example.

Upvotes: 0

Related Questions