I've never seen the * html hack (as it is often known) explained to my total satisfaction. The best that I can understand it, and I could be wrong, goes like this. First off, the true top element on any given page is the html element, nothing is above that in the DOM tree. All browsers recognize this except for IE. In IE there is a phantom top element over even the html one but, it has no name. However, since the * selector in css can represent any element, in IE it can represent this phantom top element. Since no other browser sees any element above html, the * html selector is meaningless and ignored in them. This makes it an ideal IE only css selector.
Now, min/max widths and heights are not supported in any current full release of IE (I have no idea what is in the public beta 7 or planned for the full v7 release). Fortunately, IE has a habit of ignoring other css conventions that often render min/max height or width unnecessary. It depends upon the situation. IE does have a unique method of declaring css styles that can duplicate the min/max width and height (and incidentally do things impossible in all other browsers via css) but, it will only work if javascript is enabled (thus opening the door to javascript only methods of duplication for other browsers). What I am referring to is the IE only 'expression' method of css style declaration. This is an example of how it works:
Code:
#mainarea {
width:50%;
min-width:300px;
width:expression(Math.max(document.documentElement.clientWidth/2, 300)+'px');
}
In the above the width is set for all other browsers to 50%, with a minimum of 300px. If this is an element that is just below the body in the DOM tree (and the body's width is left to its default), this will be half the window width or at least 300px. Now the expression declaration below that makes no sense to other browsers, so will be followed by IE alone. It will calculate half the window width, compare that to 300, choose the larger of the two numbers and append 'px' to the result and use that as the width for the #mainarea element. Any valid javascript may be included between the two parenthesis (rendered in red for clarity here) and any javascript function that is declared for the page may also be referred to and used in this expression calculation. The only limitation being that whatever the result of this expression may be, it must be a valid css value for the property in question, otherwise, even IE will ignore it.
Just to be on the safe side, I always combine the expression method with the * html or other IE specific methods.
Bookmarks