Posez votre question Signaler

Mon CSS ne différencie pas IE à mozilla

Flibouk - Dernière réponse le 17 juin 2008 à 11:35
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
Lire la suite 

Mon CSS ne différencie pas IE à mozilla »

5 réponses
Réponse
+0
moins plus
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
Ajouter un commentaire
Réponse
+0
moins plus
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]-->
Ajouter un commentaire
Réponse
+0
moins plus
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;
} 
Ajouter un commentaire
Réponse
+0
moins plus
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.
Ajouter un commentaire
Réponse
+0
moins plus
Ca ne marche pas non plus ce que tu m'as donnée et on dirait que mozilla aussi lis le 2eme.
Ajouter un commentaire
Ce document intitulé « Mon CSS ne différencie pas IE à mozilla » issu de CommentCaMarche (www.commentcamarche.net) est mis à disposition sous les termes de la licence Creative Commons. Vous pouvez copier, modifier des copies de cette page, dans les conditions fixées par la licence, tant que cette note apparaît clairement.
Dossier à la une
Passage au tout numérique : quel coût pour les particuliers ?