Design comparison
Solution retrospective
I have been learning for the past 3 weeks and I would greatly appreciate any feedback and tips/corrections. Thank you! :)
Community feedback
- @0xabdulkhaliqPosted over 1 year ago
Hello There๐. Congratulations on successfully completing the challenge! ๐
- I have other recommendations regarding your code that I believe will be of great interest to you.
HTML ๐ท๏ธ:
- This solution generates accessibility error reports due to
non-semantic
markup, which lack landmark for a webpage
- So fix it by replacing the
<div class="container">
element with the semantic element<main>
in yourindex.html
file to improve accessibility and organization of your page.
- 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 convey the structure of your page. 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
HEADINGS โ ๏ธ:
- And, this solution has also generated accessibility error report due to lack of level-one heading
<h1>
- Every site must want at least one
h1
element identifying and describing the main content of the page.
- An
h1
heading provides an important navigation point for users of assistive technologies, allowing them to easily find the main content of the page.
- So we want to add a level-one heading to improve accessibility by reading aloud the heading by screen readers, you can achieve this by adding a
sr-only
class to hide it from visual users (it will be useful for visually impaired users)
CSS ๐จ:
- let me explain, How you can easily center the component.
- We don't need to use
margin
andpadding
to center the component both horizontally & vertically. Because usingmargin
orpadding
will not dynamical centers our component at all states
- To properly center the component in the page, you should use
Flexbox
orGrid
layout. You can read more about centering in CSS here ๐.
- For this demonstration we use css
Grid
to center the component
body { min-height: 100vh; display: grid; place-items: center; margin: 0; }
- Now remove these styles, after removing you can able to see the changes
.container { margin: 0; margin-top: 100px }
I hope you find this helpful ๐ Above all, the solution you submitted is great !
Happy coding!
Marked as helpful2@Camoralesh27Posted over 1 year ago@0xAbdulKhalid Wow! really thanks for your review. I find it very helpful even it's not for me.
0@0xabdulkhaliqPosted over 1 year ago@Camoralesh27
Glad to hear that ! ๐ค
0@maia-fwPosted over 1 year ago@0xAbdulKhalid Thank you so much for your help! I was a bit confused on the best way to center the container ๐
0@maia-fwPosted over 1 year ago@0xAbdulKhalid Hello there, would you be able to look over my code for my latest challenge I submitted? I was having some trouble with the responsiveness for mobile.
0 - @atif-devPosted over 1 year ago
Hi Maia, congrats๐ on completing the challenge. Better take care about following points.
- Always check Frontendmentor Report Generator issues after submitting the project for removing errors and warnings. To avoid accessibility issue "All page content should be contained by landmarks" use code as :
<body> <main> ---your code here---- </main> <footer> </footer> </body>
(why
main
matters? Read here)- For proper centering the container(whole card) vertically and horizontally you can use code as:
body { min-height: 100vh; display: grid; place-content: center; }
Or you can learn centering from here.
- Remove
width: 1440px;
from body selector and also removemargin-top: 150px;
,height: 564px;
from.container
selector for proper display. - Write more in your GitHub project's README file. Like, write about your working flow, findings, new learned things, useful resources, etc.
Hope you will find this Feedback Helpful.
Marked as helpful1@maia-fwPosted over 1 year ago@atif-dev Oh I didnt know about the Frontendmentor Report Generator, I'll definity use it for the next project! Thank you :)
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