I want to create an overlay on my webpage that covers all the content. However, I'm facing a challenge because my website allows users to customize the theme colors, and the overlay div does not adopt these color changes automatically. To rectify this issue, I have resorted to setting the background-color manually using background-color: rgba( x, y, z, 1.0).
Below is the CSS code I am currently using for the overlay:
.bio-overlay {
position: fixed; /* Positioned on top of the page content */
display: block;
width: 100%; /* Occupies the entire width of the page */
height: 100%; /* Occupies the entire height of the page */
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2048;
cursor: pointer; /* Changes cursor to pointer on hover */}
If there is a way to achieve this effect purely with CSS, I would love to know. Otherwise, I am open to implementing a clever JavaScript solution. Thank you!