Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/10/2011, 13:03
Avatar de IsaBelM
IsaBelM
Colaborador
 
Fecha de Ingreso: junio-2008
Mensajes: 5.032
Antigüedad: 15 años, 10 meses
Puntos: 1012
Respuesta: middle padding y margin

middle es uno de los valores que se le puede asignar a la propiedad vertical-aling. margin y padding son propiedades
margin ---> es el margen con un elemento adyacente
padding ---> es el margen que tendrá un elemento con respecto a su contenedor

para centrar(vertical y horizontalmente) contenido(texto o imagen) dentro de un bloque
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>

<title></title>

<style type="text/css">

#cont {width: 280px; height: 280px; background-color:#000;}

#cont[id] {display: table;}



#aligncontenido[id] {display: table-cell; vertical-align: middle;}

#aligncontenido div {margin: 0 auto; width: 100px; height: 100px; background-color: #fff;}

</style>

</head>

<body>

<div id="cont">

<div id="aligncontenido">

<div>Texto</div>

</div>

</div>

</body>

</html>