alankaran a
alankaran a

Reputation: 9

Tooltip in wordpress

I am new to wordpress. I wanted to create a page in wordpress with few images on it and when we click on the image, it should display the description with the existing image on the left.

enter image description here

enter image description here

Please suggest any plugin to achieve this.

Thanks in advance.

Upvotes: 0

Views: 212

Answers (1)

Navnish Bhardwaj
Navnish Bhardwaj

Reputation: 1718

If you need this feature just on a single page. In that case, I don't think going with plugin is a good option. You can consider building something of your own as Tooltip making is not a big complex code task.

Try using this code to create one of your own

<!DOCTYPE html>
<html>
<style>
.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted black;
}

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

  /* Position the tooltip */
  position: absolute;
  z-index: 1;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
}
</style>
<body style="text-align:center;">

<p>Move the mouse over the text below:</p>

<div class="tooltip">Hover over me
  <span class="tooltiptext">Tooltip text</span>
</div>

<p>Note that the position of the tooltip text isn't very good. Go back to the tutorial and continue reading on how to position the tooltip in a desirable way.</p>

</body>
</html>

But, still if you prefer Plugin over code, then I would recommend WordPress ToolTips I had used this in past and worked fine for me.

Upvotes: 1

Related Questions