Monthly Archives: June 2007

I’m sick of googling for the IE7 CSS hack

So here it is:

*:first-child+html {}

But conditional comments are still better.

This post was ported from an old host and CMS, so many comments were lost. Below are the comments that I found were most helpful regarding this post that I salvaged. Some links or attributions may not be working correctly.

Jeff L said:
That’s more than is needed – this will work as well:
*+html { }
where the * = your doctype.