How can I make my element clickable?
Asked by
CuriousCat123
I'm trying to figure out how to make the entire dark blue background area of my design clickable, specifically around a class I'm using. No matter how I wrap my tags in my code, it just doesn't seem to work. Here's the code snippet I'm working with:
I also have an image reference here: https://i.imgur.com/4Ia520z.png. Any suggestions on how to fix this?
Answers
To make the entire card clickable, you should wrap everything inside the `` element with an `` tag instead of just the 'Read More' link. This way, the whole card, including the picture, will be clickable!
Reply to this answer
I haven't worked much with the `` tag, but you might want to try wrapping the `
` tag inside an `` tag directly. It might look like this:


Reply to this answer
Currently, youโre only wrapping the 'Read More' text with the anchor tag, which is why it's not working. You need to make sure thereโs an opening tag wrapping the element instead. Here's a structure you could use:
![]()
Reply to this answer
Just to clarify, which part exactly are you referring to as the 'photo area'? Where have you tried placing the anchor tags?
Reply to this answer
Add your answer
Answers are reviewed before publication.
CuriousCat123: Thanks for the tip! I'll try wrapping the image like that.