So I created some new productpages for this company’s website. These pages contain thumbnails that can be clicked on to pop a shadowbox-like javascript for a bigger version. All was well and the design has been used for about 30 pages so far, and about 120 images in total.
However, according to the website’s statistics and recorded surfing behavior, we noticed that the images don’t get clicked on very often. My boss blames the lack of indication that the images can be clicked, so he’d like a magnification icon to decorate the lower right corner of the images.
Instead of just opening the 120-odd thumbnails and adding an icon, I was looking for ways to automatically add the icon to the lower right corner. But my search has been unsuccessful so far.
The best way I can think of, is to give each image its own div, with said image as background-image. Then add a generic zoom-icon as a proper image on top of that that can be clicked. But the problems with this are:
- It doesn’t account for the variable width and height of each thumbnail
- It requires me to go through the code of those 30 pages and manually change the tags around
- It’ll be a dreadful task for anyone else but me to update/crate pages
So, would there be any way to force images to automatically have the zoom-icon when the -tag is within an -container? Either through plain old CSS (ideal, but doubtful) or Javascript, but my Javascript knowledge is pretty limited, sadly.