ads not responsive/fluid – SOLVED
-
The banner, aka leaderboard sized ad was not scaling on smaller screen sizes. Adding the css: width: 100%; did make the width fluid but the height stayed the same, 90px. My solution is to wrap a div around the shortcode:
<div class=”adBox”>
[the_ad_group id=”6″]
</div>Then the css:
div.adBox {
width: 100%;
padding-top: 12.5%; /* 90/720 = .125 */
position: relative;
overflow: hidden;
}
.adBox img {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}This is a well know method I’ve used before to keep iframes responsive and fluid.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘ads not responsive/fluid – SOLVED’ is closed to new replies.