Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

HTML5, CSS3

Zaib Ali•90
@zaybali
A solution to the NFT preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I could'nt fix the hover solution of Equilibrium image, so i left that part, can anyone help me put that missing part.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Éric Férole•420
    @Eric-Ferole
    Posted over 3 years ago

    Hi Zaib,

    The most valuable quality of a developper is his capacity to solve problem by himself. At junior level, most of the solution can be find by googling the issues. Per example, for your hover problem you could make a search on Google with the keywords : "image hover css". The first results answer what you were looking for. This is the best way to improve.

    Hope it helps,

    Keep up !

    Marked as helpful
  • PhoenixDev22•16,830
    @PhoenixDev22
    Posted over 3 years ago

    Hello @iamzakofficial,

    I have some suggestions:

    • Anything with a hover style in the design means it's interactive . You need to add an interactive element around theimage , Equilibrium #3429 and Jules Wyvern(in this challenge is an anchor tag <a>)

    • The images alt ="time" alt="eth" don't need filled alt. They are decorative images, so alt attribute should be left intentionally blank. You can optionally addaria-hiddenor role presentation to ensure the images are always ignored by screen readers AND image-equilibrium.jpg" and avatar's one shouldn't be empty read up about how and when to write alt text

    • <span class="nft-title highlight">Equilibrium #3429<br></span> no need for a span you can use a heading.

    • The eye image doesn't really need to be in the html, you could do it with css.

    • The last part of the card you can use some semantic tags like:

    <figure class="">
        <img class="avatar-img" src="images/image-avatar.png" alt="">
    <figcapton class=""> Creation of <a href="#">Jules Wyvern</a></figcaption>
    </figure>
    
    • You can simply use unordered list <ul>to wrapclass="info"and in each list item would have <img > OR <Svg> and <p>.

    • No need for this <hr />as you can use border-top to the <figure class="">.

    • You should use em and rem units .Both em and rem are flexible, scalable units which are translated by the browser into pixel values, depending on the font size settings in your design. Using px won't allow the user to control the font size based on their needs.

    • Try flexbox properties and a min-height 100vh on it to center the card.

    body{
    
        font-family: 'outfit', 'sans-serif';
        font-size: 18px;/* Never use font-size in pixels*/
        /* max-width: 1440px; */
        background-color: hsl(217, 54%, 11%);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        min-height: 100vh;
        width: 100%;
    }
    

    Hopefully this feedback helps.

    Marked as helpful
  • Web Wizard•5,690
    @rsrclab
    Posted over 3 years ago

    Hi, @iamzakofficial ~

    Congratulate on your solution to the challenge on FM platform. I have studied your work carefully and learned a lot from it.

    Here are some of the tips I like to provide.

    1. I hope you to add transition effect for heading and images part of the card element.
    2. Adding margin: auto property to <main> element will center your card.
    3. You can add max-width: 100% for image tags on this project.
    4. On smaller devices, we need responsiveness. That's important part here.

    https://www.frontendmentor.io/solutions/my-first-solution-on-chanllenge-V-4IzAivH

    Here is my solution to this challenge, and if it can help you even a bit, it would be happy to me.

    Cheers ~

    Marked as helpful

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub