Ver Mensaje Individual
  #6 (permalink)  
Antiguo 05/07/2010, 16:19
Avatar de deirdre
deirdre
 
Fecha de Ingreso: mayo-2009
Mensajes: 690
Antigüedad: 14 años, 11 meses
Puntos: 45
Respuesta: fondo expandido en div

Hola most

Creo que esto soluciona tu problema: pruébalo buscando una imagen mayor de 50x50px y haz un copy-paste en html vacío y lo pruebas:

Código 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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Imagen ajustada a su contenedor</title>
<style type="text/css">
#caja {
	width: 50px;
	height: 50px;
}
.mi_imagen {
	width: 100%;
	height: 100%;
}
</style>
</head>

<body>
<div id="caja"><img class="mi_imagen" alt="" src="imagen.jpg" /></div>
<!-- la imagen con la que he hecho esta prueba tiene de tamaño original 200x200px y en el html sale a 50x50px -->
</body>

</html> 
Bye