skip to menu

The Hadron Zoo of hacks for IE

Please note that this is not a page to find hacks for IE8 beta but rather how to target IE7 without also targeting IE8 beta. All hacks are valid CSS. Please use wisely.

In particle physics there is a term used to describe a pool of subatomic particles that are composed of elementary particle. There are many of them and they are referred to as a whole as the Hadron Zoo. Early on only a few were known but further test showed that these particles were predictable. Knowing this we can relate this to IE hacks.

Composite subatomic particles:

  • Flavour: Up, Down, Charm, Strange, Top and Bottom.
  • Spin: Being either matter or antimatter.
  • Color: Red, Green or Blue.

Weird and Wonderful world of IE Hacks:

  • Comment format: No comment, /**/, /*\*/, /*/, /*\*//*/, /*/*/.
  • Target or Filter.
  • Type: Simple (universal or type), Child or Adjacent selector.

Luckily for us we don't need a particle accelerator to discover the hacks but just a browser named Internet Explorer.

In the beginning

The saga of star html began many eons ago. It was introduced to trident by Chris Wilson according to Justin Rogers in his IE7 blog entry Improving the CSS 2.1 strict parser for IE7 and the star html selector bug was discovered by Edwardson Tan.

Targeting IE5 and IE6
Targetstar html
1* html

In March 2000 IE5/Mac was released and was considered the most standard compliant browser of it's time.

Filtering IE5 and IE 6
Targetstar html>bodystar star head+body
4~5* html>body* * head+body

The IE5/Mac band Pass Filter

E {property: value;}
/* */

In hindsight I wonder what Tantek Çelik will think of this filter that he created. It was in July 2004 as he was leaving his employment at Microsoft where he was the manager of the development of IE 5/Mac. At the request of Douglas Bowman he created the IE5/Mac band pass filter. Already once opening Pandora's box of hacks, little did Tantek know that four years later and three version later of IE that this latent filter was going to open the new Pandora's Box with IE8 beta.

Along comes IE7

The end of star html was beckoning, Chris Wilson was going to kill the bug but alas it was not a complete job. Very quick a new hack arrived. Now the universal selector was going to select the Doctype.

<!DOCTYPE> + <html>

Targeting IE7 and IE8

Not that the star html was completely dead, just triggered in a new way.

The flavours of the filters became more colorful since we could filter each version of IE.

Filtering IE5~IE6
Filtering IE5~IE7
Filtering IE5~6 & IE8
Filtering all versions of IE/Win
13~14html >/*/*/bodyhead +/*/*/body

Along comes IE8 beta and the opening of pandora's box

More to come.....

Targeting IE5~IE6 and IE8 beta
Targetstar html or star+html
15* /*/+ /**/html
Targeting IE5~IE6 and IE8 beta
Targetstar html or star+html
16* /*\*//*/+ /**/html
Targeting IE8 beta and Opera 9.0~9.2
17/*\*//**/*+/**/ html
Targeting IE8 beta
Filtering IE8 beta
FilterIE5~6 & IE8 beta
Targeting IE7 and Opera 9.0~9.2 and filtering IE8 beta
Filtering IE8 beta
FilterIE8 betaIE8 beta
22html/*/>/**/ bodyhtml/*/>/**/
23~24html/*/+/**/ bodyhtml/*/+/**/
25~26html/*/*/ bodyhtml/*/*/
27~28html/*/ * /**/ bodyhtml/*/* /**/
Targeting IE7 and filtering IE8 beta
Targetstar+html+ bodystar+html>, star+html+ & star+html
30~31*+html/*/+/**/ body*+html/*/+/**/
32~33*+html/*/*/ body*+html/*/*/
34~35*+html/*/ * /**/ body*+html/*/* /**/
Filtering all IE versions
FilterIE5~IE8 betaIE5~IE8 beta

Justin Rogers announced that star+html and comments will not be selected.

Created: 25 Mar 2008.

Copyright © 2008-2011 Alan Gresley

My dream... A one inter-operable open web!