Ver Mensaje Individual
  #7 (permalink)  
Antiguo 03/06/2008, 15:59
Avatar de Mikmoro
Mikmoro
Colaborador
 
Fecha de Ingreso: octubre-2006
Ubicación: K-pax
Mensajes: 7.228
Antigüedad: 17 años, 6 meses
Puntos: 280
Respuesta: Centrar dos divs

Otra manera:

Cita:
<!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" lang="es-es">
<head>
<title>centrado</title>
<style type="text/css">
#contenedor { width: 600px;
height: 400px;
background-color: rgb(51, 153, 153);
margin: 50px auto;
}
#centrado { width: 440px;
margin: 0px auto;
}
#caja1, #caja2 { width: 200px;
height: 200px;
background-color: rgb(51, 102, 102);
margin-top: 20px;
}
#caja1 { float: left;}
#caja2 { float: right;}
</style>
</head>
<body>
<div id="contenedor">
<div id="centrado">
<div id="caja1"></div>
<div id="caja2"></div>
</div>
</div>
</body>
</html>
Mikel.