Streaming live at 10am (PST)

Z-index problem

Hello :slight_smile:

I wrote a little script that allow me to pause / play an HTML5 video on mouse over.
On top of that HTML5 video, I have set up a div with absolute position to act as an overlay link.
The play / pause behaviour works perfectely well on chrome but the overlay link does not work.

On the other hand, on safari and firefox, the play / pause behaviour does not work but the link works… I believe there is a z-index issue but can’t figure out what I’m doing wrong.

Here is the screenrecording of the issue on chrome / safari:

Would someone have time to have a quick look at my simplified read-only link ?

@webdev maybe ? :blush:

Hi @anthonysalamin, I have a suggestion, try giving video a z-index of 0 and position relative:


and then give overlay z-index of 1:


I hope that helps.

Hi @cyberdave !

Thank you for getting back at me, appreciate !
It does help as the link is now clickable on all browsers.
However, the play/pause behaviour does not work neither on Chrome nor Firefox/Safari.

I tried to replicate the Webflow structure on Codepen:

… unfortunately strugelling to get it work on firefox/safari, not sure why :thinking:


Hi again :slight_smile:

I have re-worked the HTML structure and javacript to now target the parent element containing the video markup in addition to your z-index suggestion.

It now works on Chrome and Firefox, but still no luck with Safari.
I can’t figure out what it is that Safari does not like in my snipet.

Here is a little screen recording:

Here is my latest codepen

Here is my over simplified read-only webflow link

Maybe someone would like to have a look ?
Would be much appreciated :slight_smile:

Again, the expected behaviour is quite simple:
Have an autoplay HTML5 video, when the user mouse over the video > the video pauses, when he mouse out > the video plays again. The parent element of the video is listening to the hover event and triggers the pause() or play() function.

Thank you,