Ver Mensaje Individual
  #4 (permalink)  
Antiguo 30/08/2011, 16:54
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: Alinear al centro de un div texto

para que veas un ejemplo
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; http-equiv="Content-Type" charset=utf-8"/>
<title></title>
<style type="text/css">
#contenedor {width: 400px; height: 400px; background-color:red; display: table;}
#texto {display: table-cell; text-align: center; vertical-align: middle;}
</style>
</head>
<body>
<div id="contenedor">
<div id="texto">
texto centrado horizontal y verticalmente
</div>
</div>
</body>
</html>