I have a unique banner ad that I want to display as the footer on my responsive website. Using media queries recommended in the advertising documentation, I am adjusting the size based on different screen widths.
Check out the CSS code below:
<style>
@media (min-width: 320px) {
.adslot-desktop {
width: 320px;
height: 50px;
display: inline-block;
}
}
@media (min-width: 500px) {
.adslot-desktop {
width: 468px;
height: 60px;
display: inline-block;
}
}
</style>
Also, here's how I've set up my HTML:
<ins class="adsbygoogle adslot-desktop"
data-ad-client="xxxxx"
data-ad-slot="xxxxxx"
data-ad-format="auto"></ins>
When the screen width is over 500px, the expected 468x60 ad appears. However, under 500px it shows a 320x100 ad instead of the desired 320x50 ad.
Any ideas why it's not showing the specified size as intended?