Alignement horizontal en css

Fermé
tipi75 Messages postés 680 Date d'inscription lundi 20 août 2007 Statut Membre Dernière intervention 16 avril 2015 - 17 août 2009 à 19:40
 Utilisateur anonyme - 17 août 2009 à 19:52
Bonjour,


Voici mon script:

<html>
<head>
<title>page test</title>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>

<script>
$(document).ready(function(){

$(document.body).click(function () {
if ($("div:first").is(":hidden")) {
$("div").show("slow");
} else {
$("div").slideUp();
}
});

});
</script>
<style>
div {left:55%;
top:20%;
margin: 3px;
margin-left: 700px;


width:8.5%;
height:5%;
background:#3d9a44;}


</style>
</head>
<body>
Click me!
<div></div> <div></div><div></div><div></div><div></div>

</body>
</html>


Je souhaiterai un alignement horizontal ( le contraire de ce qui est représenté) mais je ne trouve pas.

Merci de votre aide

1 réponse

Utilisateur anonyme
17 août 2009 à 19:52
Un alignement horizontal pour la totalité de la page ?
body {
  margin: 0 auto;
  width: valeur largeur page;
  }
0