Design comparison
Solution retrospective
Feedback Welcomed
Community feedback
- @AdrianoEscarabotePosted about 2 years ago
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 helpful1@Cruc1f1xPosted about 2 years ago@AdrianoEscarabote thank you so much for sparing the time to critique my solution I will try out the centralizing method you suggested (^▽^)
1 - @EL132Posted about 2 years ago
Hello!
Your solution looks great!
I have two main pieces of advice:
-
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 )
-
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 helpful1@Cruc1f1xPosted about 2 years ago@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 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