enlarging image and dimming background with "onclick" attribute? Cant figure out how to add dim background after image enlarges.
<!--This code enables picture to zoom/grow , but I also need the box shadow around the img to grow--> <!DOCTYPE html> <html> <head> <title>Pet-Groom Home</title> <link rel="stylesheet" href="PetHome1.css"> </head> <body> <img onClick="showG()" id="bath" src="groomer.jpg"/> </body> <script> var img = true; function showG(){ if(img == true){ document.getElementById("bath").style.width ="800px"; } else{ document.getElementById("bath").style.width ="300px"; } if(img == true){ img = false; } else{ img = true; } } </script> </body> </html> ......................................CSS.................................................... #bath { width:300px; position:absolute; top:390px; left:45px; box-shadow:10px 5px 40px 5px black; -webkit-transition:all 0.6s ease; z-index:100; }