I have 9 images in a single page and the layout is made to look like a grid of 9 images. I have an Image which I to want use as a border for each image when u click on the image. It's a transparent image with a border,like confirming the selection of image.
How can I achieve this?When I click on the image,border image should come and again when I click on the image the border image should disappear.
Is there any way to achieve it only using the HTML and CSS
.image1 {
left: 786 px;
top: 629 px;
position: absolute;
width: 441 px;
height: 243 px;
float: left;
}
.image2 {
left: 1284 px;
top: 629 px;
position: absolute;
width: 441 px;
height: 243 px;
float: left;
}
.image3 {
left: 289 px;
top: 920 px;
position: absolute;
width: 441 px;
height: 243 px;
float: left;
}
<html>
<body>
<div class="image1">
<img src="images/image1.png" />
</div>
<div class="image2">
<img src="images/image2.png" />
</div>
<div class="image3">
<img src="images/image3.png" />
</div>
</body>
</html>