Design comparison
Solution retrospective
I see the problem with the middle block. Height isn't the same in compare to another 2. 've tried to fix it but without effect. Also I don't know if I used the correct way for responsive design. First time I've used @media
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there π. Good job on completing the challenge !
I have some suggestions about your code that might interest you.
CSS π¨:
-
I would use the body element to center it instead of centering it directly on the main, the main element can only have the 3 columns.
/* NOTE: Use the body selector instead of main*/ body { min-height: 100vh; display: flex; justify-content: center; align-items: center; /* width: 100%; */ flex-direction: column; line-height: 1.5em; } @media screen and (min-width: 1080px) main { flex-direction: row; display: flex; }
HTML π:
- You should use only one
<h1>
tag per page. The<h1>
tag is the most important heading tag, This can confuse screen reader users and search engines. This challenge requires thatSedans
,SUVs
andLuxury
are headings, but you can use the<h2>
tag instead of the<h1>
tag. You can read more about this here π.
- You should use the
<a>
tag instead of the<button>
tag because theLearn More
button is a link to another page. Use buttons to perform actions like submitting a form or closing a modal and use links to navigate to another page. You can read more about this here π.
-
Not all images should have alt text. Car icons are for decoration purposes only, so they can be hidden from screen-readers by leaving its alt attribute empty.
You can read more about this here π.
CSS Reset π:
-
You should use a CSS reset. A CSS reset is a set of CSS rules that are applied to a webpage in order to remove the default styling of different browsers.
CSS resets that are widely used:
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful0 -
- @sebframptonPosted almost 2 years ago
Hey there =)
Looks really good, just need probably to give each car a class for their button individually so when you hover over the button it changes to the same background color or you can remove the button hover and use your Id tag for the buttons in your css to use the hover effect.
buttonClass:hover{
}
id:hover{
}
Hope this helps =)
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