0

When I click "HOME" on my Navbar, it shows this, with a little white space underneath:

However, I want it to show the full display at the top, without the white space under, like this:

How can I fix this issue? Please modify my code to get the desired result and add the modified code in the answer. Here is my html and CSS code:

Mx.
  • 143
  • 11
  • Use your browser's console in its dev tools to see exactly what CSS is being applied to what element. There are several explicit heights set in your CSS. Maybe you need to look at flex. – A Haworth Jan 03 '21 at 14:36
  • It appears that you have posted sensitive/private information. If that's the case, please reset your passwords and/or revoke API keys and tokens, as they are considered compromised when posted on the internet. – Samuel Liew Jan 05 '21 at 05:59
  • Please don't make more work for other people by vandalizing your posts. By posting on the Stack Exchange network, you've granted a non-revocable right, under the [CC BY-SA 4.0 license](//creativecommons.org/licenses/by-sa/4.0/), for Stack Exchange to distribute that content (i.e. regardless of your future choices). By Stack Exchange policy, the non-vandalized version of the post is the one which is distributed. Thus, any vandalism will be reverted. If you want to know more about deleting a post please see: [How does deleting work?](//meta.stackexchange.com/q/5221) – Dharman Jan 05 '21 at 22:03

1 Answers1

1

My suggestion

<!DOCTYPE HTML>
<html>
<head>
      <link rel="icon" href="icon.png" <!--="" required="" meta="" tags="" --="">
      <meta charset="utf-8">
      <meta http-equiv="X-UA-Compatible" content="IE-edge">
      <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

      <!-- Bootstrap CSS -->
      <link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/twitter-bootstrap/4.5.3/css/bootstrap.min.css" crossorigin="anonymous">
      <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js" crossorigin="anonymous"></script>
      <link rel="stylesheet" href="animate.min.css">
      <link rel="stylesheet" href="../dist/aos.css">

      <title>Maisha Aniqa</title>

      <!-- //Styling of the Webpage -->
      <style type="text/css">

        body{
          margin-top: 55px;
        }

        .jumbotron {
          background-image: url("background.jpeg");
          text-align: center;
          height:510px;
          /*margin-top:20px;*/
          margin-bottom: 0px;
        }

        @media screen and (max-width: 650px)
        .jumbotron p {
          font-size: 0.7em;
        }

        .jumbotron2 {
          margin-top: 30px;
          margin-left: 80px;
          margin-right: 80px;
          text-align: center;
          height:300px;
        }

        .jumbotron3{
          text-align: center;
          margin-top: 2px;
        }

        .centered {
          justify-content: center;
          align: center;
          display: block; margin-left: auto; margin-right: auto;
        }
        .display-5 {
          font-size: 40px;
          text-align: center;
        }
        .display-6 {
          margin-top: 85px;
          text-align: center;
        }
        .display-1 {
          color: white;
        }

        .title1 {
          text-align: center;
        }

        .title {
          text-align: center;
        }

        .text-center {
          text-align: center;
        }


        .changeColour{
          -webkit-animation: color-change 4s infinite;
          -moz-animation: color-change 4s infinite;
          -o-animation: color-change 4s infinite;
          -ms-animation: color-change 4s infinite;
          animation: color-change 4s infinite;
        }
      </style>
</head>

<body data-spy="scroll" data-target="#navbar-example" data-offset="120" data-aos-easing="ease" data-aos-duration="800" data-aos-delay="0">

    <nav style=" " class="navbar navbar-expand-lg navbar-light bg-light fixed-top" id="mainNav">
      <div class="container">
        <a class="navbar-brand js-scroll-trigger" href="#">HOME</a>

        <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
          <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarResponsive">
          <ul class="navbar-nav ml-auto">
            <li class="nav-item">
              <a class="nav-link js-scroll-trigger" href="#about">ABOUT</a>
            </li>
            <li class="nav-item">
              <a class="nav-link js-scroll-trigger" href="#expertise">EXPERTISE</a>
            </li>
            <li class="nav-item">
              <a class="nav-link js-scroll-trigger" href="#portfolio">PORTFOLIO</a>
            </li>
            <li class="nav-item">
              <a class="nav-link js-scroll-trigger" href="#contact">CONTACT</a>
            </li>
          </ul>
        </div>

      </div>
    </nav>

    <!-- //SECTION FOR PAGE TOP -->
    <section id="page-top"></section>
        <div class="jumbotron">
          <p data-aos="zoom-out" data-aos-delay="500" style="font-size: 120px; color: white; animation-duration: 2s; animation-iteration-count: infinite; animation-delay: 1s;" class="lead pulse mb-5 green pb-5 aos-init aos-animate" id="nametagneel">Maisha Aniqa</p>
          <p data-aos="zoom-out" data-aos-delay="500" style="color:white;animation-duration:2s;animation-iteration-count:infinite;animation-delay:1s;" class="lead pulse mb-5 lightGreen pb-5 aos-init aos-animate">Aspiring Developer.<br>An Engineering student.</p>

<!--           <p class="lead"></p>
          <p class="lead"></p> -->
        </div>

    <!-- //SECTION ABOUT ME -->
    <section id="about">
        <hr class="my-2"><br>
        <div id="container">
            <br><h1 class="animated fadeIn delay-1s display-5">About Me</h1>
                <div class="row">
                        <div class="animated fadeInUp delay-3s">
                            <div class="jumbotron2">
                                <p class="lead" style="text-align:justify"><br>I am currently a second year Electrical Engineering major at <strong class="changeColour">Ryerson University</strong>. I am extremely passionate about modern technologies and innovations that are poised to shape the way we live in future. I aspire to learn new skills everyday and apply my knowledge to solve real world problems in creative ways. My areas of interest include machine learning, full-stack development, cloud computing, and advanced computer networks. I am also a software controls team member of several engineering design teams at Ryerson, specializing in robotics, autonomous systems, and space technology. </p>
                            </div>
                        </div>
                
                </div>
        </div>
        <p></p>

    </section>
</body>
</html>

just add "margin-bottom: 0px" in line 30 to override the origin style "mragin-bottom: 2rem"

Eritque arcus
  • 164
  • 1
  • 11