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

QR code component

@bruno-candia

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


How can I improve my css? I was a little in doubt if the way I made my css is the best for responsiveness.

Community feedback

P

@DarrickFauvel

Posted

Hey Bruno,

I would also recommend removing all of the complex CSS reset style rules in your stylesheet to simplify your code.

If you want to use a simpler reset, you can use this.

:root {
  font-size: 62.5%;  // as I mentioned about previously
}

* {
box-sizing: border-box;
margin: 0;
}

To explore this more, take a look at Josh Comeau's Custom CSS Reset.

If this was helpful, let me know. 👍

0
P

@DarrickFauvel

Posted

Hi Bruno, 👋

Congratulations on submitting your first solution! 🥳 It looks really good.

A good HTML practice with a card component is to wrap your card content in a <div class="card"> element. Also, within the card element, you can have card__image and card__body elements. This is what I did for my solution.

It looks like you have a mix of px and rem font sizes. I would recommend using `rem' for all font sizing so as to be responsive to grow and shrink with different screen sizes.

A method I use to help me easily translate px to rem is to set font-size: 62.5% in the :root. This makes, 10px = 1rem. This way if you want to use a font size of 24px, all you have to do is move a decimal point and use 2.4rem instead. This also works great for margins, paddings, height, and width. However, em would be a better choice for those, but it is trickier to use.

Here is a good youtube video explaining this concept.

If this was helpful, let me know. 🙂

0

@shashreesamuel

Posted

Hey bruno-candia, good job on completing this challenge. Keep up the good work

Your solution looks great however I think your card needs to be scaled up a bit using transform: scale()

I hope this helps

Cheers Happy coding 👍

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