Jump to content

Google Ads in Blog Post is making padding on Mobile Site Smaller

Recommended Posts

Hi, I'm having trouble on the mobile side of my website where every time I put a code block to a google ad, the text and content following gets increasingly smaller. Is there a way I can prevent this from occurring? This is the site:

https://rendyreviews.com/movie-reviews/madame-web-review

This is the code I use: 

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-3295604866926978"

     crossorigin="anonymous"></script>

<ins class="adsbygoogle"

     style="display:block; text-align:center;"

     data-ad-layout="in-article"

     data-ad-format="fluid"

     data-ad-client="ca-pub-3295604866926978"

     data-ad-slot="1582236482"></ins>

<script>

     (adsbygoogle = window.adsbygoogle || []).push({});

</script>

<b:if cond='data:blog.pageType == &quot;item&quot;'>

<div id='adsense-content' style='display:block;text-align: center'>

  <br/><div style="background:#00000; border-radius:0px; padding: 00px; color: #fff"> <span style="font-family:Segoe UI"><center><b>Advertisement</b></center></span> </div><br/>

Also for some reason, sometimes ON desktop, the advertisement exceeds the space of the review. Am I doing anything wrong? Thanks!

--Rendy 

Link to comment
  • Replies 3
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

This code, it should have 2 closing </div> tag

image.thumb.png.bd689dc8d169ea3b152875dd48596549.png

I think it should be

<b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='adsense-content' style='display:block;text-align:center;'>
  <br/>
  <div style="background:#00000; border-radius:0px; padding: 00px; color: #fff;"> 
    <span style="font-family:Segoe UI"><center><b>Advertisement</b></center></span> 
  </div>
</div>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.