Introduction
Disclaimer: The intention of this article is not to encourage to apply this hack to your web projects but to understand what have been using by other web designers/developers. The best way to solve Internet Explorer's CSS layout issue is - create different style sheets for different versions of Internet explorers.
Alright, have ever found yourself in this situation, you were trying to update an existing old website, opened CSS file and you saw something that you think it's typo from previous CSS coder - but it's not. There was a CSS file I was trying to update and I saw some asterisks, underscores appear randomly as a prefix in some attributes. Did some search on Google and found out it's Internet explorer hacks!
So, the main purpose of this article, is not encourage you to use hacks, but to understand what hacks have been using by others so whenever you update someone else's project you can interpret the CSS file better. :) Alright, I have collected 10 of them start from IE8 to........ IE5.0!
1. IE 8
.color {color: #f00
Comments will be moderated and
rel="nofollow"
will be added to all links. You can wrap your coding with[code][/code]
to make use of built-in syntax highlighter.http://www.quirksmode.org/css/condcom.html
Personally, I find using hacks to whip IE into shape are fine. It's a terrible browser that doesn't conform to standards and if I can limit the time it takes me to fix problems with it, I'll use hacks every time.
I think there are two times the hack :
.box {
_background: #f00;
}
I recommand to use this other hack for IE8 and below :
.box {
background: #f009
}
Have a good day !
Thomas.
.smallText { font-family:Arial; font-family:Tahoma !ie }
I believe !anything will work but !ie is nice and explanatory