The scroll bar is not displayed

Hi everyone,

I have a web page. Naturally, the scroll bar appears automatically, but it does not appear. Can you help me ?
My code html:

<nav id="navbar"> <nav id="nav-div"> <a href="#about" id="navlink">About</a> <a href="#work" id="navlink">Work</a> <a href="#contact" id="navlink">Contact</a></span </nav> </nav> <section id="welcome-section" id="about"> <h1>Hey I am Mimic</h1> <p class="p-section">a web developer</p> </section> <section id="projects" id="work"> <h2 class="h2_projects">These are some of my projects</h2> </section>

CSS:

body  {
  font-family: 'Raleway', sans-serif;
}

#navbar {
  background-color: #be3144;
  height: 70px;
  width: 1280px;
  position: fixed;
  top: 0px;
  left: 0px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

#navlink {
  color: #fff;
  text-decoration: none;
  padding-top: 30px;
  padding-right: 15px;
  padding-bottom: 21px;
  padding-left: 15px;
  margin-left: -6px;
}

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

#nav-div{
  float: right;
  margin-right: 20px;
  margin-top: 20px;
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
}

#welcome-section{
  background-color: #222224;
  margin-top: 70px;
  height: 500px;
  background-image: linear-gradient(62deg, #3a3d40 0%, #181719 100%);
  align-items: center;
}

h1 {
  padding-top: 50px;
  font-size: 57.6px;
  color: #fff;
}

.p-section {
  color: #be3144;
  font-style: italic;
  font-size: 35px;
  margin-top: -40px;
}

#projects {
  background-color: #45567d;
  padding-top: 5px;
}
        
.h2_projects {
  font-decoration: underline;
}

Thanks.

You do not have enough content on the page for a scroll bar to appear. If you add more content it will show up as needed.

You can add a height to the body just to see it, but do not keep it, you do not want a fixed height on the body.

body  {
  height: 2000px;
}

I’ve edited your post 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 (’).


You have a stray span tag in your HTML. When I remove it and format it, it looks like this.

<nav id="navbar">
  <nav id="nav-div">
    <a href="#about" id="navlink">About</a>
    <a href="#work" id="navlink">Work</a>
    <a href="#contact" id="navlink">Contact</a>
  </nav>
</nav>
<section id="welcome-section" id="about">
  <h1>Hey I am Mimic</h1>
  <p class="p-section">a web developer</p>
</section>
<section id="projects" id="work">
  <h2 class="h2_projects">These are some of my projects</h2>
</section>

Thank you very match

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