phpwcms and multiple adsense blocks
Posted: Fri 5. Nov 2004, 10:12
Hi,
have a look at my site http://ecolopop.free.fr
you'll notice two sets of google adsense blocks. One issue I encoutered was the fact that the first displayed block gets the first ads, and obviously the second block gets last ads, but sometimes none when there are not enough ads (google ads are contextual, which means each page has ads that match google's analysis of the page's most relevant keywords)
My problem was the following : with phpwcms, the left bar gets displayed first (because it is a table cell), and then the main block second. That means that the ad block I wanted to give top priority was treated after the adblock in the left margin. and when there was not enough ads, a big white space appeared on the top of my page,
I solved this with a relative positionned div to call the left menu ad block after the main body ad block and move it to the left menu
there was still an issue, even though I moved the second block , a big white space was left by that block so I had to move up my {CONTENT} using relative position again :
this works perfectly on IE, Mozilla and opera but fails on firefox.
WHY ?
thanks everyone for reviewing that case , I hope it will be useful for adsense geeks
have a look at my site http://ecolopop.free.fr
you'll notice two sets of google adsense blocks. One issue I encoutered was the fact that the first displayed block gets the first ads, and obviously the second block gets last ads, but sometimes none when there are not enough ads (google ads are contextual, which means each page has ads that match google's analysis of the page's most relevant keywords)
My problem was the following : with phpwcms, the left bar gets displayed first (because it is a table cell), and then the main block second. That means that the ad block I wanted to give top priority was treated after the adblock in the left margin. and when there was not enough ads, a big white space appeared on the top of my page,
I solved this with a relative positionned div to call the left menu ad block after the main body ad block and move it to the left menu
Code: Select all
<div style="top:350; left:-190; position:relative;z-index:100">
adsense code
</div>
Code: Select all
<div style="top:-230; position:relative;z-index:100">
</div>
WHY ?
thanks everyone for reviewing that case , I hope it will be useful for adsense geeks