Design comparison
Solution retrospective
I find a way to set gaps between li and remove the first gap.
What challenges did you encounter, and how did you overcome them?I want to use ul and li instead of div and flexbox. I want to add gaps between li, but I can't remove the first gap at the beginning. Then I found out how to use li:firstchildren to remove the first gap. I also find a way to change the color inside a . I can use li:hover a or I can set the color in to inherit.
What specific areas of your project would you like help with?how to remove warnings in frontend mentor?
Community feedback
- @Code-BeakerPosted 5 months ago
Hi there, congratulations on completing this challenge. You've done a great job with this one! 🎉
I have some suggestions regarding your code that might help you improve it.
- use
rem
instead ofpx
.rem
is a little more handy when it comes to making your website responsive. Learn more about this topic here - Do not set
width
for thesection
. If you wish to then try usingmax-width
- The gap at the top is caused by the use of
margin-top: 16px
on theli
tag. Instead, make theul
aflex
layout and use agap
so that it doesn't occur.
.links { display: flex; gap: .5rem; }
If you follow this method, you can remove this:
li { margin-top: 16px; } li:first-child { margin-top: 0px; }
- The Frontend Mentor errors indicate that your HTML is not very accessible or you have not used appropriate tags for your content.
- There is an issue with your HTML. You should remove the styles for the link from the
li
element. Apply it on thea
tag because it is meant to serve the meaning and purpose of a hyperlink. - I found these to be unnecessary:
a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; }
You can simply use:
a { text-decoration: none; }
Instead of setting it for different pseudo classes like you've done right now.
- Instead of
height: 100vh
on the body, use amin-height: 100vh
. Usingheight
will limit the height of the container to 100vh which will make your site look bad on mobile phones. Usingmin-height
will help you fix that. Also remove thewidth: 100vw
.
These are the suggestions I wanted to share with you. If you take care of these, you can avoid most of the HTML errors that are displayed on the Frontend Mentor HTML Validator.
Hope this helps you 😃
Marked as helpful0 - use
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