|
Post by Elli on Aug 16, 2019 10:03:50 GMT -7
Add Classes to Ad Containers Add classes to ad containers so that the spacing around them can be manually adjusted.
Above </body>
<script> $(function() { // Add classes to ad containers (function containAds() { $('iframe#ad-desktop-top').parent().attr('class', 'ad-banner ad-banner--top'); $('iframe#ad-desktop-top[height="50"]').parent().addClass('ad-banner--top-50'); $('iframe#ad-desktop-top[height="60"]').parent().addClass('ad-banner--top-60'); $('iframe#ad-desktop-top[height="90"]').parent().addClass('ad-banner--top-90'); $('iframe#ad-desktop-top[height="250"]').parent().addClass('ad-banner--top-250'); $('iframe#ad-desktop-bottom').parent().attr('class', 'ad-banner ad-banner--bottom'); })(); }); </script>
Example CSS
.ad-banner--top { position: relative !important; } .ad-banner--top-50 { height: 90px !important; } .ad-banner--top-60 { height: 100px !important; } .ad-banner--top-90 { height: 130px !important; } .ad-banner--top-250 { height: 290px !important; } .ad-banner--top iframe { margin: 0 auto 40px !important; }
.ad-banner--bottom { margin: 60px auto 0 !important; } .ad-banner--bottom iframe { margin-bottom: 0 !important; }
|
|