.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: black;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 3px 0;

  position: absolute;
  z-index: 1;
  /* By default tooltip appears at the left of the element. 
  If you want to show the tooltip at the right, use additional .rightTooltip class on your element */
  top: -35px;
  right: 0%;
}

/* Please keep consistent with the .tooltip .tooltiptext positioning */
.rightTooltip{
  top: -35px;
  left: 0%;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}