I am looking to add a tab to the bottom border of an image within a gallery. This tab needs to be right up against the image border with no space in between.
When clicked, this tab should activate a small JavaScript function that will display the content of div #Metadata.
function showMetadata()
{document.getElementById("Metadata").style.display="block";}
The #Metadata div contains a close button to hide its contents.
function hideMetadata()
{document.getElementById("Metadata").style.display="none";}
Both of these functions are working properly.
My issue lies in connecting this tab icon to the images on the xhtml page. Since the number and size of images vary per page, using CSS positioning with pixel values is not a viable solution.
I believe there must be a solution to this problem out there, I just haven't come across it yet.
Perhaps utilizing jQuery could provide a clever workaround.
Thank you for any responses or suggestions.