Design comparison
Solution retrospective
I am proud that i am doing much better than before. I used to hate css but now i am loving it day by day by practising.
What challenges did you encounter, and how did you overcome them?The challenge i encountered is that my solution was not responsive and still is not.
What specific areas of your project would you like help with?Kindly help me with grid and responsive.
Community feedback
- @0xabdulkhaliqPosted 7 months ago
Hello there 👋. Congratulations on successfully completing the challenge! 🎉
- I have a suggestion regarding your code that I believe will be of great interest to you.
HTML 🏷️:
- This solution may cause accessibility errors due to lack of semantic markup, which causes lacking of landmark for a webpage and allows accessibility issues to screen readers, due to accessibility errors our website may not reach its intended audience, face legal consequences, and have poor search engine rankings, highlighting the importance of ensuring accessibility and avoiding errors.
- What is meant by landmark ?, They used to define major sections of your page instead of relying on generic elements like
<div>
or<span>
. They are use to provide a more precise detail of the structure of our webpage to the browser or screen readers
- For example:
- The
<main>
element should include all content directly related to the page's main idea, so there should only be one per page - The
<footer>
typically contains information about the author of the section, copyright data or links to related documents.
- The
- So resolve the issue by replacing the
<div class="container">
element with the proper semantic element<main>
in yourindex.html
file to improve accessibility and organization of your page
.
I hope you find this helpful 😄 Above all, the solution you submitted is great !
Happy coding!
Marked as helpful2@NF0marPosted 7 months ago@0xabdulkhalid kindly check out again and give me a feedback of how i did it.
0 - @grace-snowPosted 7 months ago
Hi, To add to the above feedback this is overflowing on my screen quite badly due to the explicit widths used. There must be no widths or heights used anywhere in this except the little image. All the component needs is a max-width in rem.
Other issues I notice
- Font size must never be in px
- place styles in a separate stylesheet
- get into the habit now of always including a full modern css reset at the start of the styles in every project. Andy Bell or Josh Comeau both have good ones you can look up and use.
- border radius can be 100% for a circular image.
- it is invalid html to have a link inside a button. These are only links, not buttons. Make sure you understand the difference between those elements, it is very important to use the correct one.
- don't place height on the links, use padding.
- do not remove outline from interactive elements unless you are going to add a clear and obvious high contrast focus-visible outline. Keyboard users need to see where focus is on the page.
- as said above, this needs a main landmark to wrap the component and a footer for the attribution.
Marked as helpful1@NF0marPosted 7 months ago@grace-snow kindly Check again and please help me with how to center the container.
0 - @BigNet90Posted 7 months ago
To make any of your design responsive on any media device. First you need meta tag for viewport as mentioned by the commenter. Then you need to learn about @media query rules to specify rules for different breakpoints. Check it out on these websites web.dev, mdn and w3schools.com
Marked as helpful1 - @KansoldevPosted 7 months ago
Hi Nur Farah Omar, I think one of the reasons your solution might not be responsive is because you might not have added
<meta name="viewport" content="width=device-width, initial-scale=1.0">
in your head tag, let me know if that helps, also check if you are using width instead of max-width for the container1
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