Conditional Statements Not Working

I have three conditional statements, one is <!–[if lte IE 8]> (this one is working), the others are <!–[if IE 7]>, and <!–[if IE 8]>. I placed a display:none on the body tag in both the IE7 and IE8 stylesheets and nothing happens? What am I doing wrong?

Here is a link. I only have this code on the index page for right now.

Here is the code:

<!--[if lte IE 8]>
		<script src="js/html5shiv.js"></script>
		<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js">
	<![endif]-->

	<!--[if IE 8]>
		<link rel="stylesheet" type="text/css" href="ie8.css" />
	<![endif]-->	

	<!--[if IE 7]>
		<link rel="stylesheet" type="text/css" href="ie7.css" />
	<![endif]-->

With the code you posted?
Nothing!

I just tried this to eliminate any syntax errors and it worked as expected:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Unbenanntes Dokument</title>
    <!--[if lte IE 8]>
      <script>alert("lt IE 8");</script>
    <![endif]-->

    <!--[if IE 8]>
      <script>alert("IE 8");</script>
    <![endif]-->	

    <!--[if IE 7]>
      <script>alert("IE 7");</script>
    <![endif]-->
  </head>

  <body>
  </body>
</html>

Try this in your code (with the alert). Does it work?
If so, then I can only imagine that one of these two lines is causing you problems:

<script src="js/html5shiv.js"></script>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js">

I tried what you suggested and it worked. Why won’t the html5shiv allow stylesheets?

Wow, sometimes we just make the simplest mistakes. The location of the css file is incorrect. I forgot to place css/ in front of ie7/ie8. :goof:

Oh well, all’s well that ends well.
Sometimes just an extra pair of eyes helps.

This morning I banged my head against the screen trying to understand why I couldn’t get any experimental code to work for two hours. After which I finally realized I was edited a different file locally than the one I was FTPing. Once I realized I had to spend the next hour retrying all the ways I thought were a bust.

Doh!
That’s happened to me quite a few times, too, especially when working with a bunch of files all called “index”.
I was quite happy when DreamWeaver started displaying the path of the file you’re editing, saved me quite a lot of head banging.