Ver Mensaje Individual
  #8 (permalink)  
Antiguo 12/08/2008, 17:29
Avatar de Triby
Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: Centrar vertical y horizontalmente mi sitio web

Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html>

<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<
title>Centramiento horizontal y vertical</title>

<
style type="text/css">
body {
        
background-color#000;
}

#contenedor {
    
position:absolute;
    
width:900px;
    
height:500px;
    
margin-left: -450px;
    
margin-top: -250px;
    
left50%;
    
top50%;
    
border1px solid #484848;
</style>
</
head>

<
body>
<
div id="contenedor">
Contenido de tu página
</div>

</
body>

</
html
Sólo agrega el estilo correspondiente a body y especifica el color de tu preferencia.