Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

CSS grid, flex, positioning

@Faruq-Hameed

Desktop design screenshot for the NFT preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Having the hover effect at the center of the top image. Also the colour of the icon view (eye) is also being affected by the opacity. How can I get it to appear in as the original after applying the opacity to the hover effect.

Community feedback

PhoenixDev22 16,950

@PhoenixDev22

Posted

Hello Faruq Hameed,

Congratulation on completing this challenge. Excellent work! I have few suggestions regarding your solution, if you don't mind:

HTML

  • The interactive element <a> should be around ``the equilibrium image` not the icon-view.
  • Page should contain a level-one heading. In this challenge , as it’s not a whole page, you can have<h1> to wrap the Equilibrium #3429 <h1 class="nft-name"><a href=”#”>Equilibrium #3429</a></h1>
  • To embed a picture, it is better to use the <img> tag rather than <object>. The <object> tag was originally designed to embed browser Plug-ins.
  • The link wrapping the equilibrium image should either have Sr-only text, an aria-label or alt text that says where that link takes you.
  • For any decorative images, each img tag should have empty alt="" and add aria-hidden="true" attributes to make all web assistive technologies such as screen reader ignore those images in (icon-view, icon-ethereum, icon-clock ).
  • Profile images like that avatar are valuable content. The alternate text of the avatar’s image should not be Equilibrium Avatar Image , it’s meaningless. You can use the creator's name Jules Wyvern. Read more how to write an alt text
  • If you wish to draw a horizontal line, you should do so using appropriate CSS. You may remove the <hr>, you can use border-top: to the avatar's part.
  • There are so many ways to do the hover effect on the image, The one I would use is pseudo elements::before, ::after. You can use pseudo-elements to change the teal background color to hsla. Then the opacity can be changed from 0 to 1 on the pseudo element on the hover. Also using pseudo elements makes your HTML more cleaner as there's no need for extra clutter in the HTML. The icon view doesn’t really need to be in the HTML as there is no need for an extra clutter in the HTML.
  • Remember a css reset on every project that make all browsers display elements the same.

Aside these, Great work on this one. Hopefully this feedback helps.

Marked as helpful

0

@acezalba

Posted

For the transparency on hover, instead of changing the opacity, try using background-color: rgba(), the value being the transparent version of your hsl() color in line 46 of your style.css.

See the following stackoverflow: https://stackoverflow.com/questions/28169502/prevent-image-transparent-inside-a-transparent-div

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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