Why my paragraph is not invisible, this code is correct when I run it separately but above the image it's not working, Why??? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why my paragraph is not invisible, this code is correct when I run it separately but above the image it's not working, Why???

I want to invisible 'Click here' by changing it's opacity, but it's not working 😞 https://code.sololearn.com/Wy80JklvzBSy/?ref=app

29th Jun 2022, 1:00 PM
Pooja Sahoo
Pooja Sahoo - avatar
9 Answers
+ 4
You have used positon property absolute in <p> teg but not defined the parent container to relative you want to use in your case it is <img> so you should make the <img> position:relative in simlple words just add in css .img{position:relative }
30th Jun 2022, 7:46 AM
Sudhanshu Choursiya
+ 2
There's no paragraph (<p>) in the code, albeit there's a <div>. And I can see the <div> before and after the <img> loads. What paragraph?
29th Jun 2022, 1:38 PM
Ipang
+ 2
You are great bro... 😊🙏🙏🙏🙏🙏 Thanks a lot for your help... It's working properly.... I'm so happy 😊 now
1st Jul 2022, 5:58 AM
Pooja Sahoo
Pooja Sahoo - avatar
+ 1
Actually I was thinking that I put <p> tag 😅... But 1 thing is very confusing if this property works on <p> tag then why it's not working with <div> 🤔
29th Jun 2022, 2:13 PM
Pooja Sahoo
Pooja Sahoo - avatar
+ 1
What property works with <p> but not with <div>? you were referring to CSS property here right?
29th Jun 2022, 2:16 PM
Ipang
+ 1
Actually it's not working with both 😐You an watch my code... and I'm talking about :hover and opacity
29th Jun 2022, 2:20 PM
Pooja Sahoo
Pooja Sahoo - avatar
+ 1
Your problem isn't solved, please, don't mark my response, it wasn't the solution. Wait for someone who actually can help you solve it, and mark their answer instead 👌
29th Jun 2022, 5:11 PM
Ipang
+ 1
So after you click here you want it to vanish completely with out returning?
30th Jun 2022, 4:20 AM
Chris Coder
Chris Coder - avatar
+ 1
welcome
1st Jul 2022, 5:59 AM
Sudhanshu Choursiya