How to make floating ad slots on Blogger
This ad slot will be in the left and right position of the blog, so it will not interfere with or obstruct the content of your blog and the ad slot will only appear on Desktop mode only because if it appears in Mobile mode it is likely that this floating ad will hinder the content in the blog. For those who are curious, let's follow the following tips.
How to make floating ad slots on Blogger
Open the Blogger page , click the Layout menu , click Add Gadget then add this code inside the widget you just created
<style scoped='' type='text/css'>
.fixed-leftSd,.fixed-rightSd{position:fixed;top:60px;width:160px;height:600px;z-index:9999;transform:translateZ(0)}
.fixed-leftSd{left:0}
.fixed-rightSd{right:0}
.close-fixedSd{position:absolute;width:160px;height:15px;line-height:15px;font-size:11px;font-weight:400;top:-15px;left:0;text-align:center;background:#e0e0e0;color:#666;padding:5px 0;cursor:pointer}
@media screen and (max-width:800px){.fixed-leftSd,.fixed-rightSd{display:none;visibility:hidden;}}
</style>
<div class="fixed-leftSd">
<div aria-label="Close Ads" class="close-fixedSd" role="button" tabindex="0" onclick="this.parentElement.style.display="none"">
CLOSE ADS
</div>
<!-- Simpan kode iklan di sini -->
</div>
<div class="fixed-rightSd">
<div aria-label="Close Ads" class="close-fixedSd" role="button" tabindex="0" onclick="this.parentElement.style.display="none"">
CLOSE ADS
</div>
<!-- Simpan kode iklan di sini -->
</div>
Save the ad code in the marked code, then click Save
Use a 160x600 px dynamic ad unit or vertical ad unit in AdSense.
To see the results, you can check the Result link below
For those of you who are still in doubt and ask whether it will affect AdSense policies. In my opinion this is still safe as long as the ad units installed do not obstruct the content on the blog.
That's all from me, hope it's useful for you. Thank you for visiting.