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

Basic HTML and CSS (with Flexbox)

tbrownleeโ€ข 350

@tbrownlee

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


Was using em in the media query the best solution to change the font-size?

Community feedback

Moโ€ข 840

@MohamedAridah

Posted

Hello @tbrownlee, you did Great for this challenge, it's also Responsive so good job.๐Ÿ‘๐Ÿ‘

  • your styles to .main is extra and has no purpose. So Remove it.

  • using flex with the <img> is also can be Removed. the <img> element isn't parent for an any element so display: flex will do nothing.

  • instead of giving width property to the .text or the <img> you can just let them take 100% of the width and use padding property to control and give the outer space around the .container.

  • it's better to use rem units for font-size and somethings like that. em is relative to the font-size of its direct or nearest parent . rem is relative to the HTML (root) font-size. Read this Article for better understanding.

  • you can see My solution for this challenge it may be helpful for you..!

I hope this wasn't too long for you, hoping also it was useful๐Ÿ˜.

Goodbye and have a nice day.

Keep coding๐Ÿš€

Marked as helpful

1

tbrownleeโ€ข 350

@tbrownlee

Posted

@MohamedAridah thanks for your advice again!

I fixed the problems you mentioned. I also swapped some css properties between body and main to keep main.

I changed em to hard-coded px. I'll use rem on my next problem to figure it out and then I'll loop back and update this solution.

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