html - Make Div Background come over image -
html - Make Div Background come over image -
i trying create div background come on image
a alter image functionality similar stackoverflow
but not able come on image higher z-index
<div class='sxlb'> <label class="control-label" for="textinput">profile picture:</label> </div> <div class="sxlm"> <img src="https://encrypted-tbn3.gstatic.com/images?q=tbn:and9gcqu2jtwijgx5medj5tz7uunqxjvkk8adgy9ayp9pwqj8j-gancwjzppabbf8w" style="z-index:-1" /> <div id="changeimage" style="color:black; text-align:center;display:none;margin-top:-20px; z-index:100;background-color:gray;"><a href="#">change image</a> </div> </div> i have made sample demo fiddle problem
demo fiddleplease tell me missing here.
a z-index doesn't work when element set (default) static position, positioned elements.
anyway, don't need utilize z-index if set inner element's position absolute.
look @ this solution.
html image background
Comments
Post a Comment