I want to have a feature on my website gallery whereas when a thumbnail is selected, it gets put into a layer and displayed in the center of the screen.

Once it gets displayed, I want the screen background (everything behind the image layer) to be faded out. So probilly about brightness 50%.

Having the image appear in the center of the screen is no problem. I am trying to figure out how to get the background to fade out.

So using CSS and Javascript, what CSS attributes are required to be set? and how are they accessed using the style feature in Javascript?