how can h2
element in sandbox brought above overlay?
<h1>hello plunker!</h1> <h2>above overlay</h2> <div class="overlay"></div> .overlay { position:absolute; top:0; bottom:0; right:0; left:0; background-color: rgba(34, 34, 34, 0.8); z-index:100; } h2 { z-index:200; }
change position of element static
relative
/ absolute
/ fixed
. position: static
(the default) doesn't allow z-index
(demo):
h2 { position: relative; z-index:200; }
Comments
Post a Comment