Quick and easy IE only CSS
I remember from watching a video on the YUI Theater by Nate Koechley on the YUI CSS Foundain library and heard a sweet little trick to write CSS comments for IE only without using conditional comments.
His trick was to just append an asterisk (*) to the beginning of any command that you want to be IE only.
CSS:
-
#Box {
-
-
min-height: 500px;
-
-
max-height: 1000px;
-
-
height: 600px;
-
-
*height: 500px;
-
-
}
Just remember to do your IE only command after the firefox command. If you switched the two heights, IE would still read both and set its height to 600px.
1 comment
July 2nd, 2008 at 4:43 pm
[...] talked about how you can use the asterisk to indicate a rule is for IE only but while doing some investigation for another issue I discovered another easy hack that could [...]