Design comparison
Solution retrospective
HI I am noob to this trying to learn so plz.. share your feedbackπ and guide meβ€
Community feedback
- @GodoiTheCreatorPosted over 1 year ago
- Hi!! Great code, Congratulations!
I'll try to give you some tips, as a begginer too!
-
FrontEnd Mentor tries to correct your semantics, so instead of the main content be inside of a "container" div, use <main> tag as the main content tag, also try this to the attribution div too, as default, FrontEnd Mentor gives you the attribution div, but instead of this name, try using <footer> tag
-
Your code is almost perfect, just put the attribution div outside the main content, because it's supossed to be on the bottom of your website. And the background color is supossed to be a ligth blue, you can see all the colors used using the style-guide.md file that is in the project's folder, also, it's contain the text font used in the original project.
-
Take a look to flexbox display, this display will help you a lot on centralizing elements, control the size of the elements and the gap between them, it's perfect and very easy to learn.
Hope you enjoy your journey, as I said, I'm a begginer too, so don't take this tips as a critiscim
Marked as helpful0 - Account deleted
Hey there! π
Great job on completing the challenge and submitting your solution! π
I went through your code and I think it's pretty good, but there are a few things that could be improved for better accessibility and organization. Here's what I noticed:
In the HTML code, I noticed that the <div class="container"> element could be replaced with a more semantic element like <main>. By doing so, it will help to convey the structure of your page, making it more organized and accessible. Landmarks like <main> define major sections of your page, so you should try to use them instead of generic elements like <div> or <span>.
Additionally, I noticed that there is no level-one heading (<h1>) in your code. Having at least one <h1> element in your code is important because it identifies and describes the main content of your page. It also provides an important navigation point for users of assistive technologies. Therefore, adding a level-one heading will not only improve the accessibility of your page but also make it more organized and structured.
Lastly, I noticed that you used margin and padding to center the component in your CSS code. Instead, you can use Flexbox or Grid layout to center the component, making it more dynamic and responsive. Using the following code snippet, you can center the component using CSS Grid:
body { min-height: 100vh; display: grid; place-items: center; margin: 0; } .container { margin: 50px auto; }
I hope these suggestions are helpful to you in improving your code. Remember, by making your code more accessible and organized, you're creating a better experience for all users. Keep up the good work and happy coding! π
Marked as helpful0 - @kevintataPosted over 1 year ago
Hey! Great job on completing the challenge!
Try using the style guide to get the correct colors. (background, container, text etc) Check all the border radius' Add padding or a margin to the main white container Get the text down to the right size using margin on it
Bonus tip: Put the footer (challenge by frontend mentor coded by ritwik murugesh) outside the main container, that way you can get closer to the original!
Congratulations, Code on!
Marked as helpful0 - @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, "All page content should be contained by landmarks" is 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: 50px auto; }
.
I hope you find this helpful π Above all, the solution you submitted is great !
Happy 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