<a href="xxx.php" ><img src="<?php echo $_SESSION['picture'] ?>" id="ppicture"></img></a>
I want it to have onhover a text on it like for example edit this picture.
I thought of backgroung image on css but this is not possible as I call the image from mysql and store the location in a $_SESSION as you can see.
I’d appreciate any help.
EG. http://tympanus.net/crop1.1/ if you hover over the image, a pencil will appear. Instead of pencil, I want text to appear
This can easily be done using css positioning:
(1) create a div tag to function as a container for both the image and the text. Add a p tag around your text.
(2) add position:relative to the div you just created:
(3) add a new style for the text that positions it relative to the div:
You should now have a caption on your picture. I leave the styling up to you, and you may want to consider using JQuery to make your edit tag appear on hover.