.tooltip {
  position: relative;
  display: inline-block;
 }
 .tooltip .tooltip-text {
  visibility: hidden;
  width: 120px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 7px 5px;
  margin: 7px;
  position: absolute;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
 }
 /* Tooltip top content */
 .align-top .tooltip-text{
   bottom: 100%;
   left: 50%; 
   margin-left: -60px; /* 120/2 = 60 */
 }
 /* Tooltip right content */
 .align-right .tooltip-text {
  top: -5px;
   left: 110%;
 }
 /* Tooltip bottom content */
 .align-bottom .tooltip-text {
   top: 100%;
   left: 50%; 
   margin-left: -60px; /* 120/2 = 60 */
 }
 /* Tooltip left content */
 .align-left .tooltip-text {
  top: -5px;
   right: 110%;
 }
 .tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  border-width: 5px;
  border-style: solid;
 }
 /* Tooltip top arrow */
 .align-top .tooltip-text::after {
  margin-left: -5px;
  left: 50%;
  top: 100%; 
  border-color: #555 transparent transparent transparent;
 }
 /* Tooltip bottom arrow */
 .align-bottom .tooltip-text::after {
  margin-left: -5px;
  bottom: 100%;
  left: 50%;
  border-color: transparent transparent #555 transparent;
 }
 /* Tooltip left arrow */
 .align-left .tooltip-text::after {
  top: 50%;
  margin-top: -5px;
  left: 100%;
  border-color: transparent transparent transparent #555;
 }
 /* Tooltip right arrow */
 .align-right .tooltip-text::after {
  top: 50%;
  margin-top: -5px;
  right: 100%;
  border-color: transparent #555 transparent transparent ;
 }
 .tooltip.visible .tooltip-text {
  visibility: visible;
  opacity: 1;
 }