Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/03/2009, 19:43
Coplo
 
Fecha de Ingreso: octubre-2008
Mensajes: 155
Antigüedad: 15 años, 6 meses
Puntos: 1
como hago para que una imagen de cualquier tamaño en el centro de la pagina?

Hola, quisiera que me ayuden a que cada vez que ingrese una imagen de cualquier tamaño se quede en el centro de la pagina este es mi codigo:

index.html

<!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>
<link rel="stylesheet" type="text/css" href="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Informática Empresarial</title>
</head>

<body>

<div class="image">
<img src="calavera1.gif" border="0"></div>
</body>
</html>



style.css

@charset "utf-8";
/* CSS Document */
body {
background:url(image.jpg) top right no-repeat fixed #FFF;
}
.image{
position: absolute;
top: 50%;
left: 50%;
margin-top: -219px;
margin-left: -288px;
}