I've added this code into my header template and it's working ok apart from the vertical spacing which I need a bit of help with.
This looks fine for the larger ads
but for the 468 and 320px ads which are only 60px and 50px highs there's a gap which I'd like to get rid of
Any idea how to remove that spacing without messing everything up?
Code:
<div style="text-align: center">
<script type="text/javascript">
google_ad_client = "ca-pub-xxxx";
width = document.documentElement.clientWidth;
google_ad_slot = "xxxx";
google_ad_width = 320;
google_ad_height = 50;
/* Medium banner */
if (width > 500) {
google_ad_slot = "xxxx";
google_ad_width = 468;
google_ad_height = 60;
}
/* Large Horizontal 728x90, created 8/6/08 */
if (width > 800) {
google_ad_slot = "xxxx";
google_ad_width = 728;
google_ad_height = 90;
}
/* Large */
if (width > 980) {
google_ad_slot = "xxxx";
google_ad_width = 970;
google_ad_height = 90;
}
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
This looks fine for the larger ads
but for the 468 and 320px ads which are only 60px and 50px highs there's a gap which I'd like to get rid of
Any idea how to remove that spacing without messing everything up?