[thelist] Mozilla: Use Stylesheet?

Judah McAuley judah at wiredotter.com
Tue Feb 12 14:17:31 CST 2002


Matthew Mullenweg wrote:
> You've piqued my interest, would you mind sharing the CSS you're using
> to block ads? It would make a nice tip.
>
> -Matt

Its from a post to thelist in January by Joel Mueller.  I searched
thelist archive, but google returned a dead link, so I won't post the
link here.  Instead, as requested,...

<tip type="hiding advertisements" author="Joel Mueller" postedby="Judah
McAuley">

Save the contents below as a file called hideads.css  Go into IE to
Internet Options.  Click on Accessibility.  Check the box "Format
documents using my style sheet" and choose the file hideads.css

That's all there is too it.

/*
	Filename         : hideads.css
	Last modified by : Joel Mueller
	Created          : Wednesday, January 03, 2001 11:02:17 AM
	Last Updated     : Wednesday, January 03, 2001 1:00:43 PM
	Comments         :

	This stylesheet works in IE 5.0 and above, and will hide all images
	and IFRAMEs that meet the standard sizes for web banner ads.  This will
	block most ads from being viewed (but they are still downloaded to your
computer).
	However, it will also block innocent images that happen to be of one of the
following
	sizes.  If that happens, you can turn off this stylesheet to see the image.

	Standard ad sizes covered:
	120x240, 120x60, 120x90, 234x60, 468x60, 125x125, 392x72, 154x104

	Installation:
	Put this file anywhere on your hard drive (I use c:\winnt\web\).
	In IE, click Tools, then Internet Options.  Click the Accessibility button.
	Under "User Style Sheet" select the location where you saved this file.
*/

IMG
{
	visibility: expression(((this.clientHeight == 60 && (this.clientWidth ==
468 || this.clientWidth == 234 || this.clientWidth == 120)) ||
(this.clientWidth == 120 && (this.clientHeight == 240 || this.clientHeight
== 90)) || (this.clientWidth == 125 && this.clientHeight == 125) ||
(this.clientWidth == 392 && this.clientHeight == 72) || (this.clientWidth ==
154 && this.clientHeight == 104)) ? "hidden" : "");
}

IFRAME
{
	visibility: expression(((this.clientHeight == 60 && (this.clientWidth ==
468 || this.clientWidth == 234 || this.clientWidth == 120)) ||
(this.clientWidth == 120 && (this.clientHeight == 240 || this.clientHeight
== 90)) || (this.clientWidth == 125 && this.clientHeight == 125) ||
(this.clientWidth == 392 && this.clientHeight == 72) || (this.clientWidth ==
154 && this.clientHeight == 104)) ? "hidden" : "");
}

</tip>









More information about the thelist mailing list