Impossible de centrer son site au milieu !
Gariig
Messages postés
199
Statut
Membre
-
Gariig Messages postés 199 Statut Membre -
Gariig Messages postés 199 Statut Membre -
Bonjour,
Impossible de centrer mon site au milieu de la page !!
<html>
<head>
<style>
body {
margin:0 auto;
width:100%;
}
#conteneur {
width:700;
height:1000;
position:relative;
}
#colonne {
width:200;
height:1000;
float:left;
background-color:blue;
position:relative;
}
#main {
width:500;
height:1000;
float:left;
}
</style>
</head>
<body>
<div id="conteneur">
<div id="colonne">
hello
</div>
<div id="main">
salut
</div>
</div>
</body>
</html>
Impossible de centrer mon site au milieu de la page !!
<html>
<head>
<style>
body {
margin:0 auto;
width:100%;
}
#conteneur {
width:700;
height:1000;
position:relative;
}
#colonne {
width:200;
height:1000;
float:left;
background-color:blue;
position:relative;
}
#main {
width:500;
height:1000;
float:left;
}
</style>
</head>
<body>
<div id="conteneur">
<div id="colonne">
hello
</div>
<div id="main">
salut
</div>
</div>
</body>
</html>
Configuration: Windows Vista Firefox 3.5.3
2 réponses
-
Sur ton #conteneur, ajoutes margin:auto;
-
je voudrai cenrer mon site au milieu de la page. Rien ne marche !!
<html>
<head>
<style>
body {
margin:0 auto;
width:100%;
}
#conteneur {
width:700;
height:1000;
position:relative;
margin:0 auto;
}
#colonne {
width:200;
height:1000;
float:left;
background-color:blue;
position:relative;
}
#main {
width:500;
height:1000;
float:left;
}
</style>
</head>
<body>
<div id="conteneur">
<div id="colonne">
hello
</div>
<div id="main">
salut
</div>
</div>
</body>
</html>