javascript – Div Lights Fade Script – Not working on Mac? – Education Career Blog

I have a little javascript/css script that fades my website to black, except for the video in the middle, to give a sort of theatre effect

Example :


The script adds a black overlay on the entire page except for the “vidboxx” div.

Some people say that it is working, but not for me


Any suggestions on how to fix?


Add a z-index to “vidboxx”, which is higher than the z-index of black overlay. Example:

#black-overlay: z-index:100;
#vidboxx      : z-index:101;

with Javascript, z-index is accessible by

Leave a Comment