566 tutoriels disponibles
Chercher un tutoriel
Bienvenue
sur Shareannonce
 
Centrer un div à l'ecran
Ecrit par: Shareannonce
Date création:  10-04-2011
Nombre de vues:  2847
Catégorie:  informatique > developpement > html
Note: 
 
   Tutoriel N° 79

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Centrer une boite en CSS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<style type="text/css">
/* CSS issu des tutoriels www.shareannonce.com */
body {
margin: 0;
padding: 0;
}

#global {
position:absolute;
left: 50%;
top: 50%;
width: 700px;
height: 400px;
margin-top: -200px; /* moitié de la hauteur */
margin-left: -350px; /* moitié de la largeur */
border: 1px solid #333;
background-color: #eee;
}
</style>
</head>

<body>
<div id="global">
<p>Ici le contenu</p>
</div>
</body>
</html>



 
 
   Autres tutoriels de la même catégorie >
 
ShareAnnonce version 2.0 Tous droits reserves. | Condition d'utilisation | Contact