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 and Html

2C1F1X 35

@Cruc1f1x

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


Feedback Welcomed

Community feedback

Adriano 34,090

@AdrianoEscarabote

Posted

Hi 2C1F1X, how are you?

I really liked the result of your project, but I have some tips that I think you will enjoy:

  • to centralize this component, we can do like this:
body {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min height: 100vh;
}

avoid using id just to select an element, use id when working with js, otherwise prefer to use classes!

The rest is great!

I hope it helps... 👍

Marked as helpful

1

2C1F1X 35

@Cruc1f1x

Posted

@AdrianoEscarabote thank you so much for sparing the time to critique my solution I will try out the centralizing method you suggested (^▽^)

1
Elias Lind 130

@EL132

Posted

Hello!

Your solution looks great!

I have two main pieces of advice:

  1. Try to avoid using an id for every element. Instead, try to use a class. Using an id for every element takes away the power that comes with having an id on an element. Since an id is an extremely specific classification, you should only use sparingly. A class selector will do the same thing while leaving you the ability to specify further on an element using id. This all relates to the specificity of selectors in CSS and HTML (see link here: https://www.w3schools.com/css/css_specificity.asp )

  2. Try to use semantic components in your html instead of using a div for every element. Using semantics allows for people reading your code to better understand what each element is relating to. For example, instead of using a <div> Title </div>, you can use <h1> Title </h1> to let your code reader know that this element is a title.

I hope this helps! Elias

Marked as helpful

1

2C1F1X 35

@Cruc1f1x

Posted

@EL132 Thank you for your suggestions, I had a feeling I was making my code harder to understand hopefully next time it would be a little better if I follow your advice (~ ̄▽ ̄)~

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