Hello I have been trying for so long to make my mobile ads height lower because i want a mobile banner ad but it doesnt matter what I edit in the code, the ads height will always be 312px height. This is the ad code I use: <div> <script async src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script> <ins class='adsbygoogle' style='display:block; height: 180px' data-ad-client='ca-pub-123 data-ad-slot='123' data-ad-format='auto' overlays='false' data-full-width-responsive='true'> </ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> I hope that someone could help me with this. The old ad unit creater on adsense was much easier to understand than the todays system
No sure if it makes a huge difference, but I'd use double quotes (the way it's generated). I am wondering if display:block is what's hindering the height. Try this code: <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:inline-block;width:200px;height:180px" data-ad-client="ca-pub-123" data-ad-slot="123"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> Code (markup):
I think you need to set max-height in the style attribute, like this: style="display:block;height:180px;max-height:180px;overflow:scroll;" You can use overflow:hidden as well.
Thank you guys bit i cannot get this to work :/ when trying all of your examples, No ad is shown what so ever Any more ideas?