The structure and everything is here:
.wrapper{
position: relative;
z-index: 0;
}
.map{
position: relative;
width:300px;
height:300px;
background-color: orange;
z-index: -1;
}
.marker {
position: absolute;
width: 100px;
height: 100px;
background-color: red;
z-index: 3;
cursor: pointer;
}
.marker :hover{
cursor: pointer;
}
.description {
position: absolute;
top: 75px;
width: 150px;
height:150px;
background-color: black;
opacity: 0.5;
z-index: 2;
}
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="lib/style.css">
<script src="lib/script.js"></script>
</head>
<body>
<div class="wrapper">
<div class="map">
<div class="marker"></div>
</div>
<div class="description"></div>
</div>
</body>
</html>
And link to plunkr: https://next.plnkr.co/edit/cfBk4SPfuPZIaJFK
Description needs to be outside map div, and I'd like to make description go under the marker, but I can't get it done with position absolute and z-indexes. Any ideas?