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 QR Code Component with Plain CSS

#accessibility

@jhonmicc

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 use css unit(ex vh, rem) in my code, but I dont understand it perfectly. I want to ask you about it and the implementation, thank you 😀

Community feedback

Adarsh• 1,560

@adram3l3ch

Posted

Hi Jhon, congrats for finishing this one ✨.

Lets talk about relative units.

vh - view height - It is the height of your view port means screen. 100vh is equal to 100% of screen height similarly 50vh is 50% screen height.

vw - view width - It is same as vh but instead of height here width is referred.

rem - rem means relative to the root font size. By default 1rem is 16px. But if you increase the font size in root rem also incrases.

em - similar to rem, but instead of relative to root in em it is relative to the nearest parent with fixed font size. Let's look at an example

<div class="grand-parent">
  <div class="parent">
       <div class=child />
  </div>
</div>

:root{
   font-size:14px; //16px by default
}

.grand-parent{
  font-size:1rem;   //1 * root font size = 1 * 14px = 14px
  font-size:2rem;  // 2 * 14px = 28px
  font-size:1em;  // first check whether there is a parent with fixed font size. no such parent 
  except root , so 1em = 1 * 14px
}

.parent{
  font-size:2rem; // 28px
}

.child{
  font-size:2em; // parent has a font size of 28px so 2em = 2 * 28px = 56px
  font-size:2rem  //2 * 14px = 28px;

Hope you understood the concept

Marked as helpful

0

@jhonmicc

Posted

@adram3l3ch omg its so helpful for me, thank you

1
Naveen Gumaste• 10,480

@NaveenGumaste

Posted

Hay ! Good Job Jhon

These below mentioned tricks will help you remove any Accessibility Issues

-> Add Main tag after body like it should be your container. For 1st heading or h1 tag, use header tag and then inside the header put your h1 or h2 etc . But use header tag only once in main heading element.

Keep up the good work!

0

@jhonmicc

Posted

@Crazimonk thank you for the trick, I will implement it later

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