Mobile-first & CSS Flexbox | NFT preview card component
Design comparison
Solution retrospective
Happy to share my updated solution for this project!
I posted this challenge back in June, with some issues with using :hover
on my main image element. Today I came across an old message from a fellow community member, went back to review my code and was able to make corrections to my bugs, clean up my code, add animation to the project and reflect on all the progress I've made since the original post. Thank you and shout out to Vanza Setia for your support!
Now here's my next question fellow coders... can someone help with my accessibility and html issues.
Thanks for your time and happy coding everyone! ~V
Community feedback
- @vanzasetiaPosted over 2 years ago
Hi, Veronica! 👋
Regarding the overlay of the Equilibrium image, I can't see the
:hover
effect. I am not sure what caused it. But, I notice the invalid CSS value for thedisplay
property. Did you meanposition
instead ofdisplay
?.equilibrium { display: relative; }
Also, I don't think that by putting the
position: relative
to theimg
element would do something. So, I recommend refactoring this by doing the following.- First, we need to make the HTML right so wrap the image with an anchor tag (or
button
depending on what you would think will happen after the users click it). - Then, put the
img
element inside the anchor tag. - That's it for the HTML markup. We are going to create the overlay with pure CSS.
- So let's add
position: relative
to the anchor tag. - After that, create a pseudo-element from the anchor tag.
- Make the pseudo-element fill the entire image.
- Then add the
background
property that will show the eye icon and the cyan overlay. - Position the eye icon in to the middle of the image.
- Reduce the alpha value of the cyan color.
- Make the overlay only visible when the user hover the link element.
You can see my solution as an example,
Anyway, it's great that you spent some time writing the
README
. One thing that I would recommend is to add the syntax highlighting to the code snippet. You can read the GitHub documentation about enabling syntax highlighting.That's it! Hope this helps. 😊
Marked as helpful1@VLOrozcoPosted over 2 years ago@vanzasetia I am just now seeing this message and wish I had seen it much sooner. I appreciate your response and will be making the appropriate adjustments to make the :hover pseudo selector function properly and will look into syntax highlighting.
Thank you for taking the time to enhance this project and support my learning! ~V
0@VLOrozcoPosted over 2 years ago@vanzasetia I have updated this project (refactored & reorganize) and with inspiration from your live site, I added animation on my hover elements. 😁
While I did not see your message early on, it was fun cleaning up my code, fixing my bugs and seeing the progress I've made through creating with Frontend Mentor designs & researching docs.
In addition, I've added you to my
README
acknowledgements section. 🙂Many thanks, V
0@vanzasetiaPosted over 2 years ago@VLOrozco You are welcome, Veronica! 👍
It's good that you are fixing issues and making some improvements. 👏
Also, thank you for the acknowledgments. 😊 I am happy that my code can help you to get some inspiration. 😄
Marked as helpful1 - First, we need to make the HTML right so wrap the image with an anchor tag (or
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