1

I have been able to create the tooltips for my app. The tooltips content will comes from a DB and it is dynamic. Sometimes it will have two lines of text and sometimes it will have five lines of text. I am struggling to keep the position fixed regardless of what the content is. Is there anything I can try to fix this?

Here is a fiddle demonstrating what I am facing.

.tooltip:hover .dumClass { display: inline; color: #ffffff; border: 1px solid #DCA; background: #444; -moz-border-radius: 11px; -webkit-border-radius: 11px; border-radius: 11px; } enter code here 
2
  • Do you want the tooltip to always hover over an element in the same relative position or should the tooltip appear in a fixed location? Commented Mar 10, 2014 at 5:20
  • In the same relative position, like in the fiddle.It will appear on top of the element. Commented Mar 10, 2014 at 5:24

1 Answer 1

1

CSS

.tooltip{position:relative;} .tooltip .dumClass { z-index: 10; display: none; padding: 14px 20px; bottom:20px; left:0; width: 240px; line-height: 16px; position: absolute; } 

DEMO

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.