0

enter image description here

Hi, i need to create interactive hints.I tried to create relative block and position hints inside it (absolute) using '%'. But i could not do it.

Are there any plugins for this or is it simpler to write it myself?

Thanks!

Abhishek Pandey
  • 13,302
  • 8
  • 38
  • 68

3 Answers3

1

Search for tooltips. They can really come in handy in such a situation.

There are plenty of tooltip plugins on the net, one such is: http://qtip2.com/

Try to implement, play with and customize them.

http://qtip2.com/demos

The above link redirects to one such page where an image is there, and it lets you focus on specific image part to let the tooltip pop in.

r0u9hn3ck
  • 553
  • 4
  • 11
0

Try this: http://jsfiddle.net/mzd7maqq/114/

.html

<div id="container" class="col-lg-3">
        <div class="img-container">
            <div class="positioning">
                Some Text
            </div>
            <div class="positioningt">
                Some Text
           </div>
            <img src="http://placehold.it/300x200/eeeeee" />
        </div>
    </div>

.CSS

 .col-lg-3{
        width: 25%;
        min-width: 230px;
        float: left;
        position: relative;
        min-height: 1px;
        padding-left: 15px;
        padding-right: 15px;
        background-color: #aaa;
        text-align: center;
    }
    .col-lg-3 img {
        max-width: 100%;
    }
    .img-container {
        display: inline-block;
        position: relative;
    }
    .positioning{
      position: absolute;
      left: 35px;
      top: 22px;
      background-color: red;
      color: white;
      padding: 4px;
      font-size: 17px;
      line-height: 18px;
    }
    .positioningt{
      position: absolute;
      left: 55px;
      top: 60px;
      background-color: red;
      color: white;
      padding: 4px;
      font-size: 17px;
      line-height: 18px;
    }
Stefan Avramovic
  • 1,365
  • 2
  • 11
  • 20
0
  • if you are using bootstrap you can go through this link for bootstrap tooltip bootstrap tooltip example
    • if you are not using bootstrap then you can use this plugin just for tooltip click here
Muhammad Muzamil
  • 1,013
  • 2
  • 18
  • 25