A voir également:
- Z-index en css
- Code ascii de a à z - Guide
- Gpu z - Télécharger - Informations & Diagnostic
- Index téléphonique - Guide
- Cpu z - Télécharger - Informations & Diagnostic
- Telecharger index - Télécharger - Gestion de fichiers
4 réponses
Salut,
tes divs sont imbriqués. Le div fille est du coup à l'avant-plan.
le z-index ne fonctionnera pas.
le div avec class head2 est considéré comme un seul div contenant d'autres..
il n'y a dans ton CSS qu'un seul z-index et c'est celui de head2.
le z-index 0 pourra fonctionner à l'intérieur de ton premier div "head2"si d'autres div filles sont présents.
tes divs sont imbriqués. Le div fille est du coup à l'avant-plan.
le z-index ne fonctionnera pas.
le div avec class head2 est considéré comme un seul div contenant d'autres..
il n'y a dans ton CSS qu'un seul z-index et c'est celui de head2.
le z-index 0 pourra fonctionner à l'intérieur de ton premier div "head2"si d'autres div filles sont présents.
Voila un apercu de mon code :
J'ai donc plusieurs div filles dans mon div head2 mais votre méthode ne fonctionne pas ou peut être que je l'ai mal comprise :
<div class="head2"> <div class="menu_haut"> <a href="index.php">ACCUEIL</a> - <a href="contact.php">CONTACT</a> </div> <div class="menu_gauche" align="left"> <div width="277px" height="26px" style="padding-top:3px;"> <div style="display:inline;" width="9px"> </div> <div style="display:inline;border-right: 1px solid #d1dce3;color:#e3335a;" width="77px"><a href="particuliers.php">PARTICULIERS <div style="display:inline" width="5px"> </div></a></div> <div style="display:inline" width="5px"> </div> <div style="display:inline;border-right: 1px solid #d1dce3;color:#e3335a;" width="97px"><a href="professionnel.php">PROFESSIONNELS <div style="display:inline" width="5px"> </div></a></div> <div style="display:inline" width="5px"> </div> <div style="display:inline;border-right: 1px solid #d1dce3;color:#e3335a;" width="69px"><a href="offre.php">NOS OFFRES <div style="display:inline" width="5px"> </div></a></div> </div> </div> <div class="drapeau" align="center"> <a href="index.php"><img border="0"src="images/fr.gif"></a> <a href="english/index.php"><img border="0" src="images/en.gif"></a> </div> </div>
J'ai donc plusieurs div filles dans mon div head2 mais votre méthode ne fonctionne pas ou peut être que je l'ai mal comprise :
.head2 { width: 957px; height:537px; background: url(images/2-PARTICULIERS.png) no-repeat top center; margin: 0 auto; padding: 0 auto; z-index:1; position:relative } .menu_gauche { position:absolute; z-index:0; background-color:#e8eef1; width:478px; height:22px; color:#3f6e89; top:50px; font-family:Arial; font-size:10.5px; }
Voici ta hiérarchie :
1. head2
1.1. menu_haut
1.2. menu_gauche
1.3. drapeau
si tu mets un z-index à head2, il est unique car il n'y a pas de n°2 dans la liste.
1. head2
1.1. menu_haut
1.2. menu_gauche
1.3. drapeau
si tu mets un z-index à head2, il est unique car il n'y a pas de n°2 dans la liste.
non. ton head2 sera toujours la mère. tu dois sortir ton div menu_gauche en dehors de head2.
ou bien ce que je ferais sans connaître ta page bien sûr:
a toi de dimensionner le div image.
ou bien ce que je ferais sans connaître ta page bien sûr:
.head2 { width: 957px; height:537px; margin: 0 auto; padding: 0 auto; position:absolute } .menu_gauche { position:absolute; z-index:2; background-color:#e8eef1; width:478px; height:22px; color:#3f6e89; top:50px; font-family:Arial; font-size:10.5px; visibility:inherit; } #image { position:absolute; background-image: url(images/2-PARTICULIERS.png); z-index:1; visibility:inherit; }
a toi de dimensionner le div image.
Votre exemple ne fonctionne pas, car mon image ne se voit pas... on voit juste légèrement l'en tête
Sinon même en sortant le menu_gauche de mon head2 ca ne fonctionne pas :
code CSS :
Sinon même en sortant le menu_gauche de mon head2 ca ne fonctionne pas :
<div class="menu_gauche" align="left"> <div width="277px" height="26px" style="padding-top:3px;"> <div style="display:inline;" width="9px"> </div> <div style="display:inline;border-right: 1px solid #d1dce3;color:#e3335a;" width="77px"><a href="particuliers.php">PARTICULIERS <div style="display:inline" width="5px"> </div></a></div> <div style="display:inline" width="5px"> </div> <div style="display:inline;border-right: 1px solid #d1dce3;color:#e3335a;" width="97px"><a href="professionnel.php">PROFESSIONNELS <div style="display:inline" width="5px"> </div></a></div> <div style="display:inline" width="5px"> </div> <div style="display:inline;border-right: 1px solid #d1dce3;color:#e3335a;" width="69px"><a href="offre.php">NOS OFFRES <div style="display:inline" width="5px"> </div></a></div> </div> </div> <script language="javascript"> DD_roundies.addRule('div.drapeau', '5px'); </script> <div class="head2"> <div class="menu_haut"> <a href="index.php">ACCUEIL</a> - <a href="contact.php">CONTACT</a> </div> <div class="drapeau" align="center"> <a href="index.php"><img border="0"src="images/fr.gif"></a> <a href="english/index.php"><img border="0" src="images/en.gif"></a> </div>
code CSS :
.head2 { width: 957px; height:537px; background: url(images/2-PARTICULIERS.png) no-repeat top center; margin: 0 auto; padding: 0 auto; } .menu_gauche { position:absolute; z-index:0; background-color:#e8eef1; width:478px; height:22px; color:#3f6e89; top:50px; font-family:Arial; font-size:10.5px; }