Design comparison
Solution retrospective
Hi, I am new to front - end development. I'm trying to practice what I learn in my course through these challenges. I would appreciate any kind of feedback.
Community feedback
- @pikapikamartPosted almost 3 years ago
Hey, really nice work on this one. The desktop layout looks really nice, for responsiveness, currently the site's content is being hidden when you go to 950px below because the layout is not responding well on those part. The mobile state looks great though.
Martin Eliáš already really great feedback on this one, just going to add some suggestions on the site as well:
- The
.attribution
tag which should use thefooter
tag should be placed outside themain
tag so that it will be read as a primary landmark:
<main /> <footer />
- If you zoom out of the page, the layout is not being centered vertically since
margin
alone is not consistent. For this, you could remove themargin
from the.container
selector and on thebody
tag, you could add these stylings:
align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: 100vh;
- You can remove the
figure
on this one and just theimg
tag itself. Normally, when usingfigure
, there should be a visible text to be used asfigcaption
. - For each of the car-icons
img
tags, adding an extraaria-hidden="true"
on it would be really nice so that they will be totally ignored by screen-readers. - Just to reiterate what Martin has said about
h1
tags. Only have a singleh1
on a site. It would be great to change those headings into something likeh2
. - On a site, always have a single
h1
. Since there are no visible text that are suitable to beh1
, theh1
would be a screen-reader only heading. Meaning it will be hidden visually but present for screen-reader users. On this, theh1
would have likesr-only
class and the text-content should describe what is the main-content is all about. Theh1
could be placed as the first text inside themain
. Have a look at Grace's solution on this same challenge. Inspect the layout and see the usage ofh1
as well the stylings applied to it. - Those learn-more are better using
a
tag rather thanbutton
. On a real site, this component, the learn-more would be a page-link where user can "learn more" about a specific car. - The
.attribution
, you can remove theposition: absolute
on it since it just goes in the screen when inspecting the layout from dev tools at the bottom. - Lastly, just making the site as responsive as you can:>
Aside from those, great job again on this one.
Marked as helpful0 - The
- @martinelias1312Posted almost 3 years ago
Hello @Wrath-code, good job with relative units, variables, classes.
I found one thing and it is that your <div class="container"> is wrapping all your content, it can be fixed by this end tag </div> should be upper than your </main> end tag which also missing "/" .
And your signature <div class="attribution">, should be wrapped in <footer> element for more semantic HTML layout and better accessibility.
One more suggestion is that only one <h1> element should be used, because it is beneficial for screen reader users. Look at this article
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