Step 7 Registration Form

I was wondering why on this step we set the body width to 100% and height to 100vh. One thing I was wondering was why set the width to 100% if by default it is 100%? My other question was why are we using viewport units (vh) instead of %. Is it because we want to make sure that the height doesn’t change no matter where in the DOM the body is?

Hi, @Tadster
may I ask for your code, and link to the challenge?

https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-html-forms-by-building-a-registration-form/step-7 It’s just this step and I was curious…

Hi, if you are curious about css units try reading this post.

hope it helps.!

Well, the main question I have is why are we setting these values in the first place? Isn’t the body 100% by default and so why do we need to set them instead of just leaving it out?

Hi again take a look here.

Ok so I guess they just put it on the body because it’s semantic and good practice.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.