Design comparison
Solution retrospective
Is there any reason why do I have to use "cursor: pointer" parameter on the img-overlay element (css, line 62)? While on the hiperlinks, the cursor changes to pointer by default apparently.
Community feedback
- @MelvinAguilarPosted over 1 year ago
Hello there ๐. Good job on completing the challenge !
-
Hyperlinks (<a> tags) by default have the cursor set to "pointer" because they are intended to be clickable links, and the browser automatically applies this style to make it clear to users that they can click on those elements to navigate to another page or resource.
However, not all elements in HTML behave this way by default. For example, an "img" tag doesn't change the cursor to a "pointer" when you hover over it because images are often used for visual content such as illustrations or icons, and clicking on them doesn't usually trigger any specific action or navigation.
In short, if you see that an image has a "cursor: pointer" effect, it means that it will perform an action, and you should wrap it within an interactive tag. In this challenge, you should wrap that image in an anchor tag (a link).
I hope you find it useful! ๐
Happy coding!
Marked as helpful2 -
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord