Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

3-column preview card component

Amr_Heshamโ€ข 160

@amoorihesham

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


please rate it.

any tip to make the wrapper height be auto cause when I didn't sit its height the button stick to the bottom of the box and when hover it the wrapper height increased to make the button border.

Community feedback

@MelvinAguilar

Posted

Hi there ๐Ÿ‘‹. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.

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 that Sedans, SUVs and Luxury 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 the Learn 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 adding aria-hidden="true" and leaving its alt attribute empty:
<img src="./images/icon-sedans.svg" alt aria-hidden="true">
<img src="./images/icon-suvs.svg" alt aria-hidden="true" >
<img src="./images/icon-luxury.svg" alt aria-hidden="true" >

CSS:

  • Instead of using pixels in font-size, use relative units like em or rem. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here.
  • You should use the cursor: pointer property to indicate that the element like a button or a link is clickable.
  • You can create the border directly, and not when doing :hover to prevent the component from growing

I hope you find it useful! ๐Ÿ˜„ Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

0

Amr_Heshamโ€ข 160

@amoorihesham

Posted

@MelvinAguilar

Thank you for your comment i will edit the design and publish it again i hope you were there to see it.

1

@Ebibeni

Posted

Welldone Amr_Hesham! You have done a great job on this project. I did go through your code and discovered that your media query for mobile is not correct. You have it set to 1020px instead of 375px. Here is how it should look like. @media (max-width: 375px) { .wraper { flex-direction: column; width: 330px; height: 100%; margin-top: 2rem; } }

IF THIS WAS HELPFUL PLEASE MARK IT AS HELPFUL ๐Ÿคฉ

1

Amr_Heshamโ€ข 160

@amoorihesham

Posted

@Ebibeni

Thank you for your comment. I probably miss that i will edit it and publish it again.

1

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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