Image of a pink ladybug

CSS Test Pages

The Hadron Zoo of hacks for IE

In draft form, please forgive the poor grammar and spelling mistakes. :-)

Please note that this is not a page to find hacks for IE 8 but rather how to target IE 7 without also targeting IE 8. 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
Flavor: 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 begining

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

Targeting IE 5 and IE 6
Targetstar html
1* html

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

Filtering IE 5 and IE 6
Browserhtml>bodyhead+body
2~3html>bodyhead+body
TargetingIE5/Mac
Targetstar html>bodystar star head+body
4~5* html>body* * head+body

The IE 5/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 IE 5/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 IE 8.

Along comes IE 7

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
Targetstar+html
6*+html

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
Filterhtml>bodyhead+body
7~8html/**/>bodyhead/**/+body
Filtering IE5~IE7
Filterhtml>bodyhead+body
9~10html>/**/bodyhead+/**/body
Filtering IE5~6 & IE8
Filterhtml>bodyhead+body
11~12html/*/*/>bodyhead/*/*/+body
Filtering all versions of IE/Win
Filterhtml>bodyhead+body
13~14html >/*/*/bodyhead +/*/*/body

Along comes IE8 and the opening of pandora's box

More to come.....

Targeting IE5~IE6 and IE 8
Targetstar html or star+html
15* /*/+ /**/html
Targeting IE5~IE6 and IE 8
Targetstar html or star+html
16* /*\*//*/+ /**/html
Targeting IE8 and Opera 9.0~9.2
TargetStar+html
17/*\*//**/*+/**/ html
Targeting IE 8
TargetStar+html
18head/*/+body/**/
19head/*\*//*/+body/**/
Filtering IE 8
FilterIE5~6 & IE8
20html>head/*/*/+body
Targeting IE7 and Opera 9.0~9.2 and filtering IE8
Targetstar*+html>head+body
21*+html>head/*/*/+body
Filtering IE 8
FilterIE8IE8
22html/*/>/**/ bodyhtml/*/>/**/
23~24html/*/+/**/ bodyhtml/*/+/**/
25~26html/*/*/ bodyhtml/*/*/
27~28html/*/ * /**/ bodyhtml/*/* /**/
Targeting IE 7 and filtering IE 8
Targetstar+html+ bodystar+html>, star+html+ & star+html
29-*+html/*/>/**/
30~31*+html/*/+/**/ body*+html/*/+/**/
32~33*+html/*/*/ body*+html/*/*/
34~35*+html/*/ * /**/ body*+html/*/* /**/
Filtering all IE versions
FilterIE5~IE8IE5~IE8
36html/*\*/>/*/*/bodyhtml/*/*/>/*/*/body
37head/*\*/+/*/*/bodyhead/*/*/+/*/*/body

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

Created: 25 Mar 2008.

Honor Roll - Best

  1. Firefox 3.6.5 (beta)
  2. Safari 4.0
  3. Opera 10 (alpha)
  4. Firefox 3.0.14

Honor Roll

  1. IE 8/Win
  2. Opera 9.64
  3. Firefox 2
  4. Gecko 1.7
  5. IE 7/Win
  6. IE 5/Mac
  7. IE 6/Win (and earlier)

Template - Zeta

Last revised: 21st Oct 2009

Copyright © 2008 Alan Gresley

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