fancy
fancy

Reputation: 51393

Links passing under a div still clickable?

I'm using a div to render a shadow over some content that is passing underneath. The problem is that when the content if located under the div with the shadow you can no longer interact with the div under the shadow.

Is there any way to work around this?

Thanks

Upvotes: 1

Views: 957

Answers (3)

robertc
robertc

Reputation: 75707

You can use the pointer-events CSS property in Firefox and Chrome/Safari to let mouse clicks pass through elements. In other browsers you'd have to detect the clicks and pass them through yourself.

Upvotes: 3

whoabackoff
whoabackoff

Reputation: 1653

Why don't you just set the background colour of the text to be semi-transparent?

Here's a jsFiddle example.

I'm not sure if this is the functionality you're looking for. Maybe if you posted some of your source code...

Upvotes: 1

Max
Max

Reputation: 1334

Try using z-index property in css for the div's..

Example, Div under shadow is having z-index greater than div on the top

Upvotes: 1

Related Questions