How To Make Adsense Billboard Ad Slot With Show Hide Ad Button For Blog Non AMP HTML

| | Tutorial Ads |

How To Make Adsense Billboard Ad Slot With Show Hide Ad Button For Blog Non AMP HTML

Please note that the size of ads that appear on this billboard unit is an ad unit with size 970x250 and 300x250. Then the ad displayed we set up with responsive media query. On the 1024px screen to the top it will display the size of 970x250 while on the screen 1024px to the bottom will be displayed ads with size 300x250.

If anyone wants to try it please follow the steps below.

Please save the following CSS styles above </head> code :
<b:if cond='data:blog.pageType != &quot;static_page&quot; and data:blog.pageType != &quot;error_page&quot;'>
<style type='text/css'>
/* Top Banner */
.top_banner{margin:20px auto;padding:0 10px 20px;position:relative;width:100%;max-width:990px;height:auto;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}
#close_topbanner,#open_topbanner{font-family:inherit;position:absolute;padding:0;bottom:0;background:0 0;border:none;cursor:pointer;color:#888;font-size:15px;font-weight:500;height:20px;line-height:20px;}
@media screen and (max-width:960px){
Then save the following HTML code under <body> code :
<b:if cond='data:blog.pageType != &quot;static_page&quot; and data:blog.pageType != &quot;error_page&quot;'>
<div class='top_banner'>
<div id='topbanner'>
<!-- Kode iklan simpan di bawah ini -->
<ins class="adsbygoogle adsenseresponsive"
(adsbygoogle = window.adsbygoogle || []).push({});
<button id='close_topbanner' onclick="document.getElementById('topbanner').style.display='none';close_topbanner.style.display='none';open_topbanner.style.display='block';" role='button' tabindex='0' title='Close'>Close Ad</button>
<button hidden='' id='open_topbanner' onclick="document.getElementById('topbanner').style.display='block';close_topbanner.style.display='block';open_topbanner.style.display='none';" role='button' tabindex='0' title='Open'>Open Ad</button>
Please adjust the data-ad-client and data-ad-slot with your Adsense responsive ad unit.

And make sure you have installed Adsense js above the code </body>

thank you for kompiajaib.com

Disclaimer: Images, Content of articles or videos that exist on the web sometimes come from various sources of other media. Copyright is fully owned by the source. If there is a problem with this matter, you can contact us here.
How to style text in Disqus comments:
  • To write a bold letter please use <strong></strong> or <b></b>.
  • To write a italic letter please use <em></em> or <i></i>.
  • To write a underline letter please use <u></u>.
  • To write a strikethrought letter please use <strike></strike>.
  • To write HTML code, please use <code></code> or <pre></pre> or <pre><code></code></pre>, and please parse the code in the parser box below.
Show Parser Box