ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  The CSS Anarchist Strikes Again!
Subject:   IE6 equivalent
Date:   2003-06-11 14:36:06
From:   anonymous2
This article got me thinking, so I figured out how to do the equivalent in IE6 (which still doesn't support the more powerful CSS2 selectors).


I made a css file (contents below), and reference it with IE6's Accessibility/"Format documents using my style sheet".


IMG,OBJECT,APPLET,EMBED,IFRAME {
display:expression(parseInt(this.offsetWidth)==468 || parseInt(this.currentStyle.width)==468 || (this.src && this.src.indexOf('http\:\/\/ad')==0) ? 'none' : '');
}


It hides any culprits 468 wide, or with an "http://ad..." url. I think it should work on IE5+ too, but it's called something other than "Accessibility" there.


It also works great with the hosts file ad-block approach (which saves bandwidth, unlike this), just hiding the ugly broken ads.


1 to 1 of 1
1 to 1 of 1