IE comment not rendering css on the page at all
This is my website, it works fine on chrome, firefox and IE 9. When i try it on IE 7 & IE 8 the IE comments that I use for css is not showing at all. My website: http://www.chan-leung.com
<!--[if lt IE 9]>
<link rel="stylesheet" href="css/ieHacks.css" type="开发者_如何转开发text/css" media="screen, projection" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="css/ieHacks7.css" type="text/css" media="screen, projection" />
<![endif]-->
The css files works fine locally, but when i upload to my hosting, the css doesn't show. I'm using IE debugger for browser testing (for IE). The F12 key for IE. When i try to look up ieHacks.css & ieHacks7.css, nothing is showing. I'm stump as to what would be the reason why the ie comments is not working.
Any help or suggestion would be greatly appreciated.
Perhaps you have names the css files incorrectly?
You site is maybe trying to use css/ieHacks.css and css/ieHacks7.css but the actual files are css/iehacks.css and css/iehacks7.css
Also try using absolute urls and see if it makes a difference e.g:
<!--[if lt IE 9]>
<link rel="stylesheet" href="/css/iehacks.css" type="text/css" media="screen, projection" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="/css/iehacks7.css" type="text/css" media="screen, projection" />
<![endif]-->
Also, just a note, you are doing a more general assignment first and another more specfic one second, was this intended? The first css file will be applied to ie7 as well as the second, more specific one.
UPDATE:
Your site css seems to be the following which isn't like you said in your question:
<!--[if lte IE 8]>
<link rel="stylesheet" href="css/iehacks.css" type="text/css" media="screen, projection" />
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" href="css/iehacks7.css" type="text/css" media="screen, projection" />
<![endif]-->
<!-- [if !IE 7]>
<style type="text/css">
#wrap {display:table;height:100%}
</style>
<![endif]-->
精彩评论