I have my script like this:
var imagenes={"leon":'<img src="imagenes/leon.gif" width="200" height="200"/>',"burro":'<img src="imagenes/burro.gif"/>',
"ballena":'<img src="imagenes/ballena.gif"/>',"gato":'<img src="imagenes/gato.gif"/>',
"elefante":'<img src="imagenes/elefante.gif"/>',"pato":'<img src="imagenes/pato.gif"/>',
"hiena":'<img src="imagenes/hiena.gif"/>',"grillo":'<img src="imagenes/grillo.gif"/>',
"pajaro":'<img src="imagenes/pajaro.gif"/>',"cabra":'<img src="imagenes/cabra.gif"/>',
"jaguar":'<img src="imagenes/jaguar.gif"/>',"mono":'<img src="imagenes/mono.gif"/>',
"oso":'<img src="imagenes/oso.gif"/>',"caballo":'<img src="imagenes/caballo.gif"/>',
"sapo":'<img src="imagenes/sapo.gif"/>',"perro":'<img src="imagenes/perro.gif"/>',
"vaca":'<img src="imagenes/vaca.gif"/>'}
function agregar(){
var nueva=document.getElementById("opcion").value;
div=document.getElementById("impresion");
for(i in imagenes){
if(nueva==i)
div.innerHTML+=imagenes[i]+" ";
}}
function borrar(){
div.innerHTML="";
}
and my html is like this:
<!DOCTYPE html>
<html>
<head>
<title>ANIMALES</title>
<link rel="stylesheet" type="text/css" href="animales.css">
<script type="text/javascript" src="js/animales.js"></script>
</head>
<body>
<select id="opcion">
<option value="" disabled selected>--ELIGE UNA OPCION--</option>
<option value="leon">LEON</option>
<option value="elefante">ELEFANTE</option>
<option value="grillo">GRILLO</option>
<option value="cabra">CABRA</option>
<option value="gato">GATO</option>
<option value="caballo">CABALLO</option>
<option value="mono">MONO</option>
<option value="jaguar">JAGUAR</option>
<option value="pajaro">PAJARO</option>
<option value="oso">OSO</option>
<option value="pato">PATO</option>
<option value="perro">PERRO</option>
<option value="sapo">SAPO</option>
<option value="vaca">VACA</option>
<option value="burro">BURRO</option>
<option value="hiena">HIENA</option>
<option value="ballena">BALLENA</option>
</select>
<button onclick="agregar()">AGREGAR</button>
<button onclick="borrar()">BORRAR</button><br><br>
<div id="clase">
<div id="impresion"></div>
</div>
</body>
</html>
What it does is that when I choose the select and click on the add button, it looks for the image and sends it to the div, but I need all the images to be the same size. I also have a CSS but I do not know if this is wrong to the html.
.clase{
width: 500px;
height: 500px;
border-radius:8000px;
border-color: black;
}