I have been using this responsive Google ad code on my website to display ads.
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-REMOVED"
data-ad-slot="REMOVED"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
However, the ad displayed is too large. I want to restrict Google ads to a space of 1000px
width and 100px
height on my website. I have tried creating a div
box with max-height:100px;
and max-width:100px
, but it did not work. Can anyone provide a solution? I am using Bootstrap, so a Bootstrap-based solution would be preferred, but not mandatory.
<div class="row gutter-vr-30px align-items-center">
<div class="col text-center h-100">
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-REMOVED"
data-ad-slot="REMOVED"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>