In this article, I would like to introduce how to use CSS to remove the white borders from Adsense/Chitika Ads.
In previous article Use Javascript to Remove Borders from Adsense Ads, I introduced how to do this via javascript code.
But it has some disadvantage: if the network is slow, user may notice the white border appears and disappear. Not very user friendly.
Luckily we can do this via CSS - it;ss a much better solution.
AdSense1, AdSense2 are ids of Adsense Ads, HTML1, HTML2 are ids of Chitika Ads.
Now we can see the white border is gone.
For more information. please view Use Javascript to Remove Borders from Adsense Ads
In previous article Use Javascript to Remove Borders from Adsense Ads, I introduced how to do this via javascript code.
But it has some disadvantage: if the network is slow, user may notice the white border appears and disappear. Not very user friendly.
Luckily we can do this via CSS - it;ss a much better solution.
CSS Code to Remove White Borders from Adsense Ads
<style type='text/css'> #AdSense1, #AdSense2, #HTML1, #HTML2, #AdSense1 .widget-content, #AdSense2 .widget-content, #HTML1 .widget-content, #HTML2 .widget-content{ border:0px none transparent; margin:0; padding:0; } #AdSense1, #AdSense2, #HTML1, #HTML2{ background-color: inherit; } </style>
AdSense1, AdSense2 are ids of Adsense Ads, HTML1, HTML2 are ids of Chitika Ads.
Now we can see the white border is gone.
For more information. please view Use Javascript to Remove Borders from Adsense Ads