I’m trying to overlay an image over various slides in Nivo Slider – you know, the typical “learn more…” image link over the slide that appears with the slide and then fades with the slide. I can force an image into the html caption area, as I mentioned in a post at the Dev7 forum (see – HELP: how to float an image over a slide? - Dev7studios Support Forum), but the opacity is a problem. If I turn down the opacity of the html caption area, the “learn more…” image also fades.
Do you have a link to the page in question as we need to see what structure you have as well as have something to test ideas out on?
Opacity applies to an element and all its children and can’t be turned off for child elements.
What you’d need to do is take the element out of the parent that has opacity applied and then absolutely place it back into position. As it is no longer a child it will not have any opacity. You would just need ot ensure that a grandparent has a stacking context applied instead (position:relative) to maintain the correct position
I hope that might help, otherwise I can throw something up on a free hosting site. Here’s also a screencap of what I’m trying to do where I’ve put a familiar image into the html caption area and you can see that opacity around it which I’m trying to remove.
In the site you linked to the text is still at 80% opacity. All that has changed is that there is no background colour behind the text. Is that what you want to do - i.e. just remove the background colour?
Paul, seriously, nice one. That worked. The ‘!important’ wouldn’t override the js, but once I changed that and put the other styles from your post in the right css (there’s two), it worked a charm. The image link floats on the slide now without opacity. Complete win. Sincere thanks, Paul. Good stuff.