Positionnement de deux div dans une div
Bonjour :)
Je rencontre quelques soucis dans le positionnement de div. Je possède un foot et à l'intérieur deux div, footer-menu et footer-copyright. Voir l'exemple.
Avec le CSS suivant:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| .footer {
background-color:red;
padding-bottom:10px;
padding-top:10px;
padding-left:10px;
padding-right:10px;
}
#footer-menu {
background-color:green;
width:25%;
}
#footer-copyright {
background-color:yellow;
width:25%;
} |
Le code HTML est le suivant:
Code:
1 2
| <div id="footer-menu">Footer menu</div>
<div id="footer-copyright">Footer copyright</div> |
Je souhaite obtenir ce résultat. Voir l'exemple.
Pour cela, je modifie mon code CSS comme suit:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| .footer {
background-color:red;
padding-bottom:10px;
padding-top:10px;
padding-left:10px;
padding-right:10px;
}
#footer-menu {
background-color:green;
width:25%;
position:relative;
float:left;
}
#footer-copyright {
background-color:yellow;
width:25%;
position:relative;
float:right;
} |
J'obtiens toujours le même résultat. Voici l'exemple. Le module foot est mangé :aie:
Avez-vous une petite idée s'il vous plaît ?
Merci d'avance :)