merci pour ta reponse, mais je dois avoir raté quelque chose,
le menu est au centre, mais il decale le div contenu
j'ai beau essaye de mettre lediv contenu apres mon menu
ça ne change rien??
je suis en train de lire tous les tutorials les uns derriere les autres
mais de l'aide me ferait du bien
merci d'avance
<style type="text/css">
<!--
/* CSS issu des tutoriels www.alsacreations.com/articles */
html, body {
height: 100%;
width: 100%;
overflow: auto;
}
body {
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size: 0.8em;
margin: 0;
padding: 0;
}
#header {
background-color: #96C8E2;
width: 100%;
height: 10%;
}
dl, dt, dd, ul, li {
margin: 0;
padding: 0;
list-style-type: none;
}
#menu {
position: relative;
margin-left: auto;
margin-right: auto;
width:22.0cm; /* largeur obligatoire pour être centré */
[b]
=============
[eek] la largeur est obligatoire, mais que va t il se passer en fonction des ecrans pour les utilisateurs????
=============
[/b]
text-align: center;
}
#menu dl {
float: left;
width: 12em;
}
#menu dt {
cursor: pointer;
text-align: center;
font-weight: bold;
background: #ccc;
border: 1px solid gray;
margin: 1px;
}
#menu dd {
display: none;
border: 1px solid gray;
}
#menu li {
text-align: center;
background: #fff;
}
#menu li a, #menu dt a {
color: #000;
text-decoration: none;
display: block;
height: 100%;
border: 0 none;
}
#menu li a:hover, #menu dt a:hover {
background: #eee;
}
#contenu {
height: 90%;
width: 100%;
margin: 0;
padding: 0;
overflow: auto;
background-color:#96C8E2;
}
-->
</style>
et
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
include "head.php";
?>
<body>
<div id="header">logo à placer</div>
<?php include "menu.php";?>
<div id="contenu">
contenu<br />
contenu<br />
contenu<br />
contenu<br />
contenu<br />
</div>
</body>
</html>
Modifié par mod52 (09 Jun 2005 - 16:29)