-1

Am trying to add the text on image when hovered using only css. But through out the internet am finding insertion through html and css

3
  • What is your HTML code? Commented Dec 22, 2016 at 11:39
  • am keeping only image tag as <img src="anyimage.jpg"> because I want to add text also through css only. So am unable to find it Commented Dec 22, 2016 at 11:41
  • Questions seeking code help must include the shortest code necessary to reproduce it in the question itself preferably in a Stack Snippet. See How to create a Minimal, Complete, and Verifiable example Commented Dec 22, 2016 at 12:55

1 Answer 1

-1

Have you searched stack overflow thoroughly?

On my first search i found this: Text on image mouseover?

I am assuming this is what you want since you have not made your question clear!

Edit: Thanks to tiny more clarification is this what you want to do: Using only CSS, show div on hover over <a>

Further Edit:

So what you will do is change div to your id for your p. And change your a to img.

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

4 Comments

I want to add that p tag on mouse hover only through css
I want to add that <div> only through css like inserting text on image using only css
Ok yes it is possible but it is really really bad practice and some browsers will not support it have a look at this: stackoverflow.com/questions/4879719/insert-html-from-css

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.