The question is very strange indeed, so let me explain with a snippet :
.container {
width: 200px;
height: 200px;
background: rgba(200, 200, 200, .87);
}
.pin {
position: absolute;
left: 50px;
top: 20px;
}
.overlay {
position: absolute;
left: 25px;
top: 40px;
background: grey;
border: 1px solid white;
padding: 12px;
padding-top: 30px;
}
.overlay:before {
content: '';
position: absolute;
border: 1px solid white;
width: 48px;
height: 48px;
border-radius: 50%;
top: -30px;
left: 10px;
}
<div class="container">
<div class="pin">
<svg width="24" height="36" viewBox="0 0 192 290" xmlns="http://www.w3.org/2000/svg">
<path d="
M11 138
a 94 94 0 1 1 170 0
l -85 150
l -85 -150
" fill="white" stroke="black" stroke-width="2" stroke-opacity="0.9" opacity="0.9" />
</svg>
</div>
<div class="overlay">
Content
</div>
</div>
As you can see in this snippet, there is a pin, with some content in front of it.
I would like the pin to be contained in the white circle, without the content overlapping this circle. Like, if the circle had punched through the content, and removed a little part of it.
I thought about creating a SVG instead of a DIV for the content container (so that the top part of that container has half a circle less), but I'm not sure if it is suited for this case (the content will be dynamic and the width of the content can change).
Is there a way to achieve what I want, with CSS only ?
Thank you in advance.