Responsive Cars Preview Card Using (CSS Grid + Flexbox)
Design comparison
Solution retrospective
- I added a little animation hope you like it.
- Feel free to give feedback.
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hi @Muhammad-adam778 π, good job completing this challenge! π
I like this solution for the challenge. I have some suggestions you might consider to improve your code:
- Instead of using pixels in font size, use relative units of measure like
rem
orem
. The font size in absolute length units (px) does not allow users with limited vision to change the text size in some browsers. You can read more about this problem here.
- The
<h1>
element is the main heading on a web page. There should only be one<h1>
tag per page. The HTML Section Heading elements (Reference). This case requires thatSUVs
,Sedans
, andLuxury
be<h2>
elements.
- The
Learn More
elements should beanchor
tags and not buttons because they redirect to another website. Use buttons to perform actions such as displaying a modal, performing calculations. Use anchor tags to redirect users to a part of the page or to an external site.
Please don't worry if your suggestions are long, they are just details. In the end, the project is well done π. Hope you find those tips helpful! π
Good job, and happy coding! π
Marked as helpful2@Muhammad-adam778Posted almost 2 years ago@MelvinAguilar
Thank you very much for these wonderful notes, it really helped me,
But I have a question about this problem:
- WARNING
- Page should contain a level-one heading
<html lang="en
1@MelvinAguilarPosted almost 2 years ago@Muhammad-adam778 Hello π, I see you have already solved the problem. I believe what you have done is correct, add a hidden h1 to avoid the warning, although the following class is a standard way to hide it:
<h1 class="sr-only">Cars Preview</h1> .sr-only{ clip: rect(0 0 0 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
Very good work!
0 - Instead of using pixels in font size, use relative units of measure like
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