Targeting IE only with CSS

I got a question from Jeff yesterday asking me about a CSS tag that he'd never seen before, and in fact, neither had I. 

What he saw was this:

*html someclassname
{
   properties in here
}
*html Anotherclassname
{
   properties in here
}

I started to do some investigation and see what I could find out.  I checked one of my favourite CSS Books (Web Standards Solutions: The Markup and Style Handbook), nothing, I tried to search on https://search.msn.com and https://www.google.com and nothing.  (It is kind of hard to search for *html when you actually want * not the wildcard!)

I emailed Dan Cederholm (the author of the book above) and he graciously replied with the answer this morning.  It's a way of targeting CSS to only Windows IE.  IE believes that there is a wrapper element around the HTML block, and thus applies these rules to the block.  Great if you need to fix a CSS rendering issue in Windows IE.

I've also posted some new Night photos at https://www.bigbackpack.ca/ngallery/albums/Night+and+Low+Light+(July+21%2c+2005).aspx

Comments

  • Anonymous
    July 27, 2005
    Cool thanks Pete this is indeed very helpful and a useful thing as well a way to specifically target CSS for IE.
  • Anonymous
    July 27, 2005
    The comment has been removed
  • Anonymous
    July 27, 2005
    The comment has been removed
  • Anonymous
    July 28, 2005
    Oh Pete on another note your night images are great, I really like the one of the ship. But you know one thing that would be nice is if you could make these handy wallpaper sizes. 1024 X 768 I am capable of cropping it and did I liked it enough to make it my wallpaper for a while. However your the artist I might not have cropped it exactly where you would have. Just a suggestion.
  • Anonymous
    July 29, 2005
    If I were to make them 1024x768, I'd just end up adding black borders to the sides. I shoot with a square format camera, which gives me a bit of a differentiation than 35mm.