Google AdSense ads not positioning correctly
I noticed recently on several of my sites that my Google AdSense ads were no longer being positioned correctly when looking at my sites using IE6 or IE7. The ads would start out in the correct location. But after every thing got loaded, the position of the ad would change so that the ad was floating on top of my content.
Obviously Google made some sort of change in the AdSense code to cause this since it was not happening before. But the big question is, how to fix it? In my case, the ads that were being displayed wrong inside of div elements that were themselves nested inside of other div elements. Using the IE developer tools, I could see that all of the div elements were being position using relative positioning except for the final element inserted code from the AdSense iframe which seemed to be using absolute for the position element.
So the fix was very simple. I added position: relative to the CSS of the div element containing my ads. Once I did that it fixed the problem and the ads were positioned correctly.
Obviously Google made some sort of change in the AdSense code to cause this since it was not happening before. But the big question is, how to fix it? In my case, the ads that were being displayed wrong inside of div elements that were themselves nested inside of other div elements. Using the IE developer tools, I could see that all of the div elements were being position using relative positioning except for the final element inserted code from the AdSense iframe which seemed to be using absolute for the position element.
So the fix was very simple. I added position: relative to the CSS of the div element containing my ads. Once I did that it fixed the problem and the ads were positioned correctly.
| Rating: | 100% positive, 3 total Votes |
| Categories: | adsense IE6 IE7 google css |
| Added: | on Feb 26, 2009 at 10:18 am |
| Added By: | an anonymous user |
| Searches: | adsense google ads element ie7 |

