I'm trying to add a centered arrow/triangle on each side of a rectangular tooltip div and I've tried applying some code from other questions and demos, but none look centered or the arrow's shadow overlaps the div. The arrow should be white with a shadow of 0 0 20px 0 rgba(0, 0, 0, 0.2);.
HTML:
<div class="tooltip cal-tooltip">
<div class="tooltip cal-tooltip">
<div class="cal-tooltip-cont">
<div class="cal-tooltip-img four-three-img">
<img src="http://placeholdit.imgix.net/~text?txtsize=75&txt=Event%20Photo&w=600&h=400" />
</div>
<div class="card-info">
<h2>Wrapping related content title</h2>
<h3>Event date</h3>
<h3>Event venue</h3>
</div>
</div>
</div>
CSS:
.tooltip {
position: absolute;
top: 0;
z-index: 1;
background-color: white;
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2);
}
.tooltip > div {
padding: 15px;
}
.tooltip > div img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.cal-tooltip {
width: 20em;
cursor: auto;
}
.cal-tooltip .cal-tooltip-cont {
display: flex;
}
.cal-tooltip .cal-tooltip-cont > div {
flex-basis: 50%;
}
.cal-tooltip .cal-tooltip-cont > div:nth-child(1) {
padding-right: 5px;
}
.cal-tooltip .cal-tooltip-cont > div:nth-child(2) {
padding-left: 5px;
}
.cal-tooltip .cal-tooltip-cont > div h2 {
padding-bottom: 5px;
font-size: 1em;
}
.cal-tooltip .cal-tooltip-cont > div h3 {
font-size: .85em;
}