The height of the welcome section is not equal to the height of the viewport

FCC: Personal Portfolio* (codepen.io)

What’s funny is this was among the first tests I cleared when I started on this project yesterday! But between then and now I must’ve done something wonky that messed it up. I’m really not sure what is wrong-- I have the section’s height set to 100vh, and pasted the meta definition from the HTML gear at the top of my HTML text. Advice would be much appreciated!

Hello.
You messed up with

padding-top: 50px;

it’s messing things up.
If don’t want to remove that padding-top: ;
try adding
width: 91.1vh;
think why it’s working now.
try different units for padding /margin/width/height etc. and find which works best

Thank you for your response! I had thought that was it too, but then both when I set the padding to 0 and when I took the line about padding out entirely, I still failed the test :stuck_out_tongue: I may have misunderstood you though?

@w.leighty564, the failing test says

The navbar should always be at the top of the viewport.
Navbar's parent should be body and it should be at the top of the viewport : expected 68.46875 to be close to 0 +/- 15
AssertionError: Navbar's parent should be body and it should be at the top of the viewport : expected 68.46875 to be close to 0 +/- 15

I suggest you remove the padding top completely from #Welcomesection

and if you run the test it will display that navbar is not at the top of the viewport set the navbar top property to 0 and all the tests will pass.

or you could use flexbox

`#welcome-section
{
display: flex;
flex-direction:column;
font-family: sans-serif;
font-size: 55px;
justify-content:center;
align-items:center;
color: #082a6f;
background-color: #c9c1cc;
height: 100vh;

}
#welcome-section > p
{
font-size: 40px
}` and set navbar top property to 0 your portfolio would look exactly the same .

1 Like

Hello.
try and add →

margin:0;
top: 0; 

in your body element.

  1. your #navbar should be
#id-element {
  top: 0;
  left: 0;
}

you don’t need that. remove it!

1 Like

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