I’m trying to achieve something which doesn’t seem possible with standard tools, but what do I know:
I’d like to display some small lines of describing text directly on top of the images of the site when hovering over the image. The text should only get visible when hovering, invisible when not and is different for every image.
Adding a container (vertical align)
add image
add text
The text will be below the image at this point so you will need to change the text element position to absolute and then style it (position, colour etc).
To get the hover to appear effect, you will need to go the image and give it a z-index of 2 which should now make the image above the text (text not visible). Then go to hover mode and change the z-index from 2 to -2 so now when you hover on the image it pushes it behind to reveal the text.
Thanx guys! z-index works like it should apart from being not able to fade the text in.
With opacity I have the problem that the area of the text is not the same as the picture, so the text only gets visible when you hover over the text area.
I’d like it to get visible when hovering anywhere over the image area. Is there an easy way to accomplish this?
it depends which element you’re using for your text (most of them are wrapped with wrapper divs, so applying a width and a height won’t have any effect, except if you’re using the basic text element).
You can keep it simple and put your text element inside a container element, set its width and height to 100%, position: absolute (top right bottom left to 0) and change the hover state on the container instead of your text element.