Design comparison
Solution retrospective
Beginner here: Where could I improve to make the code cleaner and more efficient?
Community feedback
- @NomiDomiPosted almost 3 years ago
Hey @Osumii,
One best practice is to not specify the height of anything if possible. The height should be auto, therefore not even mentioned. It should automatically increase based on the items within.
I would not use ul and li tags the way you did. All of those could be divs. The use of ul and li is different. Check this for a better understanding.
For example for the nft-card-creator you could have written things like:
<div class="nft-card-creator"> <img src="./images/image-avatar.png" alt="Creator"> <div class="name">Creation of <span>Jules Wyvern</span></div> </div>
Great job on using CSS variables. I would encourage you to put font sizes and weights there too.
I see you using vw for font sizes in
font-size: 1.2vw;
. Use rem, em, px, never vw or vh.Here are some very good videos that will give you a solid base you could continue building on:
- Are you using the right CSS units?
- CSS em and rem explained
- Improve your CSS by Keepin' it DRY
- CSS variables
Hope this helps!! Keep coding! :)
Marked as helpful0
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