I am having a simple web page with a navigation
bar. When is toggle my navigation bar I want the rest of area in my page to be overlay live Youtube(A sample image is attached below). But after trying 100 time the result is attached below(A sample image is attached below).The problem is it's not overlaying
the element which has defined color
attribute.
My css code to achieve overlay:
.overlay{
width: 100%;
position: fixed !fixed;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.5) !important;
z-index:0;
cursor: pointer;
}
The below example just plays with
visibility
andopacity
of overlay wrapper.