Personal Portfolio Webpage - Build a Personal Portfolio Webpage

I’m continuously getting the error Nav position should be at the top of viewport. help me please


body{
font-family: 'Poppins', sans-serif;
margin:0;
padding:0;

}

#nav-bar{
  background-color:#be3144;
  position: fixed;
  top:0;
  left:0;
  width:100%;
  display: flex;
  justify-content:flex-end;
}

#nav-list{
  display: flex;
  flex-direction: row;
}

li{
  list-style: none;
}

a{
  color: white;
  text-decoration: none;
  font-size:1.5em;
  padding: 2rem;
}

a:hover{
  background-color:#45567d;
}

#welcome-section{
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #000;
  background-image: linear-gradient(62deg, #3a3d40 0%, #181719 100%);
}

h1{
  color: white;
  font-size: 4rem;
  font-weight: 700;
}

#welcome-section > p{
  color: #be3144;
  font-size: 2rem;
  font-style: italic;
  font-weight: 100;
  
}

.projects{
  margin:0;
  padding: 8rem 2rem;
  text-align: center;
  background-color: #45567d;

}

h2{
  font-size: 3.2rem;
  color: white;
}

@media(max-width: 800px){
  h2{
    font-size: 2.5rem;
  }
}

.project-img{
  height: calc(100%- 4.8rem);
  width: 100%;
  object-fit: cover;
}

.project-tile{
  color:white;
  width: 100%;
  background-color: #303841;
  margin: 0;
  padding: 2rem 0;
}
.projects-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  grid-gap: 4rem;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  margin-bottom: 6rem;
}

#contact{
  background-color: #303841;
  width: 100%;
  height: 80vh;
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center; 
  align-items: center;
  }

#contact-p{
  color: white;
  font-style: italic;
  font-weight: 100;
   text-align: center;
   font-size: 1.7rem;
}

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

Replace these two sentences with your copied code.
Please leave the ``` line above and the ``` line below,
because they allow your code to properly format in the post.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Challenge: Personal Portfolio Webpage - Build a Personal Portfolio Webpage

Link to the challenge:

1 Like

Hi!

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Please include your html code, without it I can’t check if the problem lies there. :slight_smile:

Check if nav tag has an id set to nav-bar properly. The HTML code would also be helpful if provided

not able to post the html code

checked it i have given the correct id

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