Dear potential helpers,
I try to darken the foreground of my website using a background-color.
I created a div which wraps all my other HTML stuff, applied position: relative; to it and a very great z-Index of 999.
All my other elements have a z-index of 100 or lower. Why isn't my div not shown in front of the other stuff?
In case the background-color of my div foreground is only shown behind all the other elements inside it.
Here is my HTML:
<html>
<body>
<div id="foreground">
<!-- All my other HTML stuff having relative positioning and z-index 100 or less -->
</div>
</body>
</html>
Here is my CSS:
#foreground
{
position: relative;
z-index: 999;
display: block;
background-color: red;
}
Maybe u guys have any idea what the matter with this one. Thank you!