#heading{
height:240px;
background-image:url(images/head7.png);
}
<!DOCTYPE html>
<html>
<body>
<h2>Norwegian Mountain Trip</h2>
<img ID="myImage" border="0" src="/images/pulpit.jpg" alt="Pulpit rock" width="304" height="228" onclick="myFunction()">
<script>
function myFunction() {
myimg = document.getElementById("myImage");
myimg.style.height = "50%";
myimg.style.width = "50%";
}
</script>
</body>
</html>
Take a look also to http://stackoverflow.com/questions/170624/javascript-image-resize if you want to introduce absolute variable, scale variables, etc.
#heading{
height:240px;
background-image:url(images/head7.png); /////image is set this way
}
<div id="heading">
</div
function changeimage(myIMG) {
myELM=document.getElementById(myIMG);
myELMIMG=myELM.src;
myELM.src=myELM.lowsrc;
myELM.lowsrc=myELMIMG;
}