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

Card layout (QR Code) that doesn't move

Jack 30

@Jackgomez

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


I struggled a little with adding web fonts, so I wonder if there is a better way of adding fonts. I copied the link tags given in google. Thanks

Community feedback

Adriano 34,090

@AdrianoEscarabote

Posted

Hi Jack, how are you?

Welcome to the front-end mentor community!

I really liked the result of your project, but I have some tips that I think you will enjoy:

  • every Html document must contain the main tag, so we can identify the main content, to fix this, wrap all the content with the main tag. HTML5 landmark elements are used to improve navigation experience on your site for users of assistive technology.
  • Consider using rem for font size .If your web content font sizes are set in absolute units, such as pixels, the user will not be able to re-size the text or control the font size based on their needs. Relative units “stretch” according to the screen size and/or user’s preferred font size, and work on a large range of devices.

The rest is great!

I hope it helps... 👍

Marked as helpful

0

Jack 30

@Jackgomez

Posted

Hi @AdrianoEscarabote, thank you so much for taking the time to check my project. I really appreciate your tips, I had no idea about (rem) especially. Thanks for your support!

1

@amalkarim

Posted

Hi Jack.

Congrats on your first submission in Frontend Mentor!

About your question, I think there are two ways to add Google Fonts to your project. The first is by using <link>...</link>. Here is the full code

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&display=swap" rel="stylesheet">

The second way is by using @import method inside your css file before any other styling, like this

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&display=swap');

Whether you want to use the first or the second method, it's really up to you. But for me, I personally like the @import method, because it's more concise.

Hope this helps!

Marked as helpful

0

Jack 30

@Jackgomez

Posted

@amalkarim. Thank you for your explanation, it makes a lot more sense now and will probably use @import in the future too. Thanks again!

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