My goal is to make manipulations to an image by adding shapes on top of the image using JavaScript.
For example, adding rectangular shapes to an image of a refregirator, as shown below:
<!DOCTYPE html>
<html>
<head>
<style>
#avaliableSpace {
border-radius: 25px;
background: #00B050;
padding: 20px;
width: 125px;
height: 75px;
}
</style>
</head>
<body>
<img src="http://imageshack.com/refrigerator.png" alt="Kitchen Refrigerator" style="width:1600px;height:1200px;">
<p id="avaliableSpace"> </p>
</body>
</html>
I was able to get image to show up using a url link, but the rectangular shape is not overlaying on top of the image, rather appears below the image. I don't know what to do to make the rectangular shape to append to the image. I tried specifying x and y coordinates within the #avaliableSpace code block, but that didn't work.