Personal Portfolio Webpage - Build a Personal Portfolio Webpage

I have one open issue with this, the one point I cannot get is:

Your #navbar element should always be at the top of the viewport.

I have the following part in my CSS code:

body {
font-family: ‘Roboto’, roboto;
line-height: 1.5;
text-align: center;
background-color: #2f365a;
color: white;
}

img {
width: 100%;
height: auto;
}

header {
color: white;
position: fixed;
}

#navbar {
background-color:lightblue;
display: flex;
width: 100%;
position: fixed;

}

#navbar ul {
list-style: none;
display: flex;
}

#navbar ul a {
display: flex;
padding: 1.2rem 5rem;
text-decoration: none;
color: #fff;
font-size: 1.4rem;
font-weight: 500;
align-items: center;
}

  1. Where is the unit? 120 of what?
  2. I guess top means the very top, not 120 off of something from the very top.

As you can see your navbar is 120 ? from the top.

deleting that part didn’t help :frowning:

#navbar {
background-color:lightblue;
display: flex;
width: 100%;
position: fixed;
}

still gives me the same error that the #navbar should always be on top

Don’t delete it, just set it up to a value of the 'top; property to “0px;”, and of the ‘left’ property also to "0px; Add these two properties after the: position: fixed;

1 Like

Aw man, so obvious in retrospective… Thanks for your help!

1 Like

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