I am trying to apply the solution found in the this question, but it is not working in my case.
I want to bring the red circle above the green line.
.box{
border: 1px solid blue;
height: 100px;
position: relative;
width: 100px;
}
.dot{
background: red;
border-radius: 50%;
height: 30px;
width: 30px;
position: absolute;
right: -15px;
top: 50%;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
}
.dot:after{
background: green;
content: '';
height: 100px;
width: 10px;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
z-index: -1;
}
<div class="box">
<div class="dot"></div>
</div>
<div class="box">
<div class="dot"></div>
</div>