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

Responsive landing page using html and css.

@lola-ilori

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

I’m most proud of launching my first-ever live website. It’s exciting to step away from learning and test my abilities in real-time.

I’m still learning, so I know I’ll make mistakes, but I’m eager to learn from each one.

What challenges did you encounter, and how did you overcome them?

CSS was my greatest challenge. There are a lot of best practices, do's and don'ts that I didn’t fully adhere to. Additionally, I found myself re-inventing the wheel a lot while styling certain elements. Thankfully, research and AI came to the rescue.

What specific areas of your project would you like help with?

CSS, definitely! There are a lot of nuances and styling techniques that are still new to me. I'm eager to learn them all and would appreciate any guidance in these areas.

Community feedback

P

@Islandstone89

Posted

HTML:

  • Every webpage needs a <main> that wraps all of the content, except for <header> and footer>. This is vital for accessibility, as it helps screen readers identify a page's "main" section. Change .wrapper into a <main>, and move the <footer> outside of the main.

  • Remove the .clearfix div, it is not needed.

  • I wouldn't use <figure> for the image - that is used when we want to include a caption underneath the image. Here is some more info about the <figure> element.

  • The alt text must also say where it leads(the frontendmentor website). A good alt text would be "QR code leading to the Frontend Mentor website."

  • Headings should always be in order, so you never start with a <h3>. I would change it to a <h2> - a page should only have one <h1>, reserved for the main heading. As this is a card heading, it would likely not be the main heading on a page with several components.

CSS:

  • Including a CSS Reset at the top is good practice.

  • I like to add 1rem of padding on the body, to ensure the card doesn't touch the edges on small screens.

  • Remove the styles on .wrapper, it doesn't need any styles.

  • On the body, change height to min-height - this way, the content will not get cut off if it grows beneath the viewport. Remove overflow, width, max-width and margin, none of those are needed. Add flex-direction: column and gap: 2rem.

  • On the card, you need to add display: flex for flex-direction and align-items to work.

  • Remove all widths and heights in px.

  • Add a max-width of around 20rem on the card, to prevent it from getting too wide on larger screens.

  • font-size must never be in px. This is a big accessibility issue, as it prevents the font size from scaling with the user's default setting in the browser. Use rem instead.

  • letter-spacing must also never be in px. You can use em, where 1em equals the element's font size.

  • Since all of the text should be centered, you only need to set text-align: center on the body, and remove it elsewhere. The children will inherit the value.

  • Paragraphs have a default value of font-weight: 400, so there is no need to declare it.

  • On the image, add display: block and max-width: 100% - the max-width prevents it from overflowing its container. Remove the margin, except for margin-bottom.

  • To create the space between the image and the edge of the card, set padding on all 4 sides of the card::padding: 16px;.

  • As the design doesn't change, there is no need for any media queries. When you do need them, they should be in rem or em, not px.

Marked as helpful

0

@lola-ilori

Posted

@Islandstone89 Thank you so much for the detailed feedback. Very much appreciated. I'll adjust my code accordingly.

1
Zein 350

@Zein-MB

Posted

Hello there👋

Congratulations on finishing this challenge

I have a little note, try adding some box shadow to make it fit with the design, that's all.

Otherwise your solution is perfect.

Have a nice day

Marked as helpful

0

@lola-ilori

Posted

@Zein-MB . Thank you! and I appreciate the feedback. I'll use the box-shadow style as advised.

0
Dave 40

@Guitar8634

Posted

Nice job matching the solution to the design. The code is clearly readable. Perhaps consider using an <h1> instead of <h3> for semantics? Does having an <h3> imply that there is an <h2> and <h1> before it? I could be wrong about this.

As a next step, consider making use of variables in the CSS for the colors listed.

well done!

0

@lola-ilori

Posted

@Guitar8634 Thanks for the feedback! I'll update my code accordingly and use the correct heading semantics.

0

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