1

I am beginer in creating of webpages and i would be grateful for an easy simple example of CSS tooltip on image with Html5 standard. I know there are some examples but they are kinda hard for me.

3
  • I know there are some examples but they are kinda hard for me. So why would it be any easier here? Commented Feb 25, 2015 at 18:58
  • I hope there are some people that have some experiance with teaching. I need an example without styles. Just basic simple CSS tooltip on image.. Commented Feb 25, 2015 at 19:00
  • check this css tooltip lists designerslib.com/tag/css-tooltip Commented Sep 14, 2015 at 12:09

1 Answer 1

4

Here is probably the simplest tooltip that takes advantage of the native title attribute of an element:

<style>
    p[title]:hover:after {
        content: attr(title);
        padding: 10px;
        background-color: white;
        position: absolute;  
    }
</style>

<p title="I am a tooltip!">Hover over me</p>

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.