Mon CSS ne différencie pas IE à mozilla

Bonjour,

ci joint mon css mais j'arrive pas faire la différence entre internet explorer et mozilla et je comprend pas pourquoi.

merci pour votre aide

<!--[if !IE]>--><style type="text/css">

html, body {
margin:0;
height: 100%;
}

*
{

font-style: normal;

}

.contenu {
height: 100%;

}

.menu {
background-image:url(3.jpg);
float: left;
width:258px;
height:453px;
}
.centre {
position : center;
margin-left: 10px;
float : center;

}

.blocnews {
margin-left: 926px ;
margin-top:-230px;
width:55px;
height:481px;
background-image:url(image_013.jpg);
}

.pied {
position : center;
margin-left:257px;
margin-top:780px;
width:675px;
height: 69px;
background-color:#BEDEC7;
}

</style><!--<![endif]-->

<style type="text/css">
<!--
html, body {
margin:0;
height: 100%;
}

*
{

font-style: normal;

}

.contenu {
height: 100%;

}

.menu {
background-image:url(3.jpg);
float: left;
width:258px;
height:453px;
}
.centre {
position : center;
margin-left: 10px;
float : center;

}

.blocnews {
margin-left: 926px ;
margin-top:-230px;
width:55px;
height:481px;
background-image:url(image_013.jpg);
}

.pied {
position : center;
margin-left:257px;
margin-top:1200px;
width:675px;
height: 69px;
background-color:#BEDEC7;
}
-->
</style>

merci
Configuration: Windows Vista
Internet Explorer 7.0

5 réponses

  1. Bah, il faut que tu inverses, tu met le <!-- if ie--><style....</style><!--.--> Après l'autre, car vu que IE lis le deuxieme, il efface le premier ;o
    1. ok comme ca : mais ca marche toujours pas

      <style type="text/css">

      <!--

      html, body {
      margin:0;
      height: 100%;
      }

      *
      {

      font-style: normal;

      }

      .contenu {
      height: 100%;

      }

      .menu {
      background-image:url(3.jpg);
      float: left;
      width:258px;
      height:453px;
      }
      .centre {
      position : center;
      margin-left: 10px;
      float : center;

      }

      .blocnews {
      margin-left: 926px ;
      margin-top:-230px;
      width:55px;
      height:481px;
      background-image:url(image_013.jpg);
      }

      .pied {
      position : center;
      margin-left:257px;
      margin-top:1200px;
      width:675px;
      height: 69px;
      background-color:#BEDEC7;
      }
      -->
      </style>

      <!--[if !IE]>--><style type="text/css">

      html, body {
      margin:0;
      height: 100%;
      }

      *
      {

      font-style: normal;

      }

      .contenu {
      height: 100%;

      }

      .menu {
      background-image:url(3.jpg);
      float: left;
      width:258px;
      height:453px;
      }
      .centre {
      position : center;
      margin-left: 10px;
      float : center;

      }

      .blocnews {
      margin-left: 926px ;
      margin-top:-230px;
      width:55px;
      height:481px;
      background-image:url(image_013.jpg);
      }

      .pied {
      position : center;
      margin-left:257px;
      margin-top:780px;
      width:675px;
      height: 69px;
      background-color:#BEDEC7;
      }

      </style><!--<![endif]-->
      1. Huum, deja si je lis bien ton CSS, y'a que le margin-top de la class "pied" qui varie, donc tu alourdis énormement ton code, vu que tu remet les trucs en deux fois.

        html, body {
        margin:0;
        height: 100%;
        }
        
        *
        {
        
        font-style: normal;
        
        }
        
        
        
        
        .contenu {
        height: 100%;
        
        }
        
        .menu {
        background-image:url(3.jpg);
        float: left;
        width:258px;
        height:453px;
        }
        .centre {
        position : center;
        margin-left: 10px;
        float : center;
        
        }
        
        .blocnews {
        margin-left: 926px ;
        margin-top:-230px;
        width:55px;
        height:481px;
        background-image:url(image_013.jpg);
        }
        
        
        .pied {
        position : center;
        margin-left:257px;
        margin-top:1200px !important;
        margin-top:780px
        width:675px;
        height: 69px;
        background-color:#BEDEC7;
        } 
        1. ba oui c'est le but d'avoir une différence entre IE et mozilla car il lise pas la meme chose alors si je met la meme valeur dans margin-top de la class "pied" j'ai un décalage entre mozilla et IE d'où le but de les différencier.
          1. Ca ne marche pas non plus ce que tu m'as donnée et on dirait que mozilla aussi lis le 2eme.