Friday, December 10, 2004
Kill RSS ads with CSS
When I opened up The Social Software Weblog RSS feed this morning, I was disappointed to find ads embedded in each item. I had been reading that RSS ads were coming; however, I had managed to avoid them until today.
Because I am using the not-so-fancy-but-good-enough-for-me Sage RSS reader in Firefox, I am already using a custom CSS file that formats my feeds. However, after reviewing the code of the feed, I found that there isn't a div called "ad" that would make it super easy to hide.
Instead of hiding one div, I decided to hide all divs that don't have a specific class associated with them and then add code to display those that do have a specific class associated with them, so I added:
div {display:none}
to the CSS file. This will hide any div which doesn't have a class specified (as is the case with the div containing the ad).
On the other 6 or 7 classes, I added "display:block" to override the "display:none." The result? No ads! Woo Hoo!
Here is a before and after screenshot.
blog comments powered by Disqus
When I opened up The Social Software Weblog RSS feed this morning, I was disappointed to find ads embedded in each item. I had been reading that RSS ads were coming; however, I had managed to avoid them until today.
Because I am using the not-so-fancy-but-good-enough-for-me Sage RSS reader in Firefox, I am already using a custom CSS file that formats my feeds. However, after reviewing the code of the feed, I found that there isn't a div called "ad" that would make it super easy to hide.
Instead of hiding one div, I decided to hide all divs that don't have a specific class associated with them and then add code to display those that do have a specific class associated with them, so I added:
div {display:none}
to the CSS file. This will hide any div which doesn't have a class specified (as is the case with the div containing the ad).
On the other 6 or 7 classes, I added "display:block" to override the "display:none." The result? No ads! Woo Hoo!
Here is a before and after screenshot.
About Shawn Morton
Married father of (soon to be) 5, director of mobile, social & emerging media at Nationwide Insurance, consumer electronics enthusiast, hair metal aficionado. View more on LinkedIn.





