Z-indexing a SVG Element

Viewed 6159

Hi I am havng an issue with setting the Z-index of a SVG element with respect to an HTML Element

My HTML Element(Popup) has a z-index of 4 My SVG Element(Line) has z-index of 3

But still my SVG element is overlapping the html popup. If i reduce the z-index on svg further it disappears like in the below screenshots

SVG z-index @ 3

enter image description here

SVG Z index @ 2

enter image description here

Is there anyway I can setup the z-index so that the line is drawn behind the popup?

Thank You

EDIT:

heres what I have tried till now

The popover consists of 4 divs

.markerBubble {
  position: absolute;
  background: white;
  border: 2px solid white;
  padding: 10px;
  border-radius : 4px;
  box-shadow:4px 6px #888888;
  max-width: 250px;
  max-height:150px;
  overflow-y:auto;
  z-index: 4;
}

.markerBubbleouter{
  display: flex;
  
}
 .markerBubble1{
  width:60%;
  padding-right:10px;
  text-align:right;
 }
 .markerBubble2{
  width:30%;
  text-align:left;
 }

markerBubble contains the rest of 3 divs outer,1 and 2 so I have put z-index on markerBubble.

For the SVG Line i have put the following CSS

.leader-line{
  position: relative;
z-index: 3;
}

0 Answers
Related