DIV en css - Positionnement incorrect
Bonjour à tous,
J'ai pris un modèle sur la manière de concevoir un site.
Voilà mon prb :
Le css m'a grandement servi mais, eh oui ! y a un mais, j'ai rajouté 2 div (pour la pageinfos (vous êtes ici >...) et pour un autre menu) et ce dernier qui me pose prb.
Je mets les codes et la capture, ce sera mieux pour que vous y voyiez plus clair.
Dans cette capture, la suite de lettre sera le menu pour les liens internes.
Vous constaterez que je n'arrive pas à prendre la largeur de l'écran sous le header (dans le css : width: 95%; ou même width: auto; c'est pareil, no good !)
Code Html :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Mon super site</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="" href="css/main.css" />
<!--
<style type="text/css">
</style>
-->
</head>
<body>
<!-- debut pageinfos -->
<div id="pageinfos">
<?php include("css/pageinfos/pageinfos.html"); ?>
<!-- fin pageinfos -->
</div>
<!-- debut header -->
<div id="header">
<?php include("header.html"); ?>
<!-- debut header -->
</div>
<!-- debut menu -->
<div id="menu">
<?php include("menu.html"); ?>
<!-- debut menu -->
</div>
<!-- debut menu -->
<div id="menug">
<?php include("menug.html"); ?>
<!-- fin menu -->
</div>
<!-- debut contenu principal -->
<div id="conteneur">
<?php
if (isset($_GET["page"])) $page = $_GET["page"];
else $page = 0; // par défaut intro.php
switch ($page) {
case 0 : include("./accueil.html"); break;
case 1 : include("./page1.html"); break;
case 2 : include("./page2.html"); break;
case 3 : include("./page3.html"); break;
case 4 : include("./page4.html"); break;
case 5 : include("./page5.html"); break;
}
?>
<!-- fin contenu principal -->
</div>
<!-- debut footer -->
<div id="footer">
<?php include("footer.html"); ?>
<!-- fin footer -->
</div>
</body>
</html> |
Code Css :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
| @charset "iso-8859-1";
/************************************/
* {
font-family: Verdana, Garamont, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
}
/************************************/
body{
width: 95%;
margin: auto;
margin-top: 0px;
margin-bottom: 0px;
background-image: url("../images/fond5.png");
}
/************************************/
#pageinfos{
background-color: #ffffff;
color: #000000;
margin-bottom: 0px;
padding-left: 10px;
height: 15px;
}
/************************************/
#header{
width: auto;
height: 100px;
background-image: url("../images/banniere.jpg");
background-repeat: no-repeat;
margin-top: 0px;
margin-bottom: 0px;
}
/********* C'est ici que ça va pas ***************************/
#menu{
float: left;
width: 95%;
height: auto;
position: relative;
margin-top: 0px;
background-color: cyan;
}
/************************************/
#menug{
float: left;
width: 140px;
background-color: transparent;
margin-top: 5em;
margin-left: 0em;
}
.element_menu{
background-color: #FFFFFF;
background-image: url("../images/motif.png");
background-repeat: repeat-x;
border: 1px solid black;
margin-bottom: 20px;
}
/* Quelques effets sur les menus */
.element_menu h3{
color: #B3B3B3;
font-family: Arial, "Arial Black", "Times New Roman", Times, serif;
text-align: center;
}
.element_menu ul{
list-style-image: url("../images/puce.png");
padding: 0px;
padding-left: 20px;
margin: 0px;
margin-bottom: 5px;
}
.element_menu a{
color: #B3B3B3;
}
.element_menu a:hover{
background-color: #B3B3B3;
color: black;
}
/************************************/
#conteneur{
margin-left: 120px;
margin-bottom: 0px;
margin-top: 5em;
padding: 5px;
color: #000000;
background-color: #ffffff;
border: 1px solid black;
}
#conteneur h1{
color: #000000;
text-align: center;
font-family: Arial, "Arial Black", "Times New Roman", Times, serif;
font-size: 160%;
}
#conteneur h2{
height: 30px;
padding-left: 30px;
color: #000000;
font-size: 120%;
text-align: left;
}
/************************************/
#footer{
padding: 5px;
margin-top: 15em;
text-align: center;
color: #ffffff;
background-color: #FFFFFF;
background-repeat: repeat-x;
border: 2px solid black;
}
/************************************/ |
Si vous pouviez me dire le pourquoi du comment, ce serait bien, parce que là, j'ai du mal à voir ce problème.
Comme c'est là, voilà ce que ça donne:
http://www.test.jlb59.fr/prb-position.jpg
Si vous voulez voir le site complet c'est ici.
Ne me laissez pas en rade SVP !
Merci d'avance.
Cordialement, QI9859