title: How to scroll a whole webpage and content at once?
body: <p>I have a div that has a transparent black so that the actual background color still shows but darkened. Inside this div I have a div with text.</p>
  <p>So when added the text to my div I realized it had 2 &quot;scrollable&quot; sections, one for the div with the content and another one for the background div which has 100% width.</p>
  <p>The end result should just be one scroll that goes through the page's height and reaches the footer.
  Instead, right now I have to scroll inside the content div to see all the text and only when I place the mouse on the background div in the sides I'm able to reach the end of the page.</p>
  <p><strong>Here is the Code:</strong></p>
  <p>Maybe I am using the wrong elements or there is another way to get the same effect that I am trying to achieve.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>*
  {
      -webkit-font-smoothing: antialiased;
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Courier New', monospace;
  }
  
  body
  {
      /*background: linear-gradient(-45deg, #ff933b, #e73c7e, #27e1ee, #20f3c2);*/
      background: linear-gradient(-45deg, #ffe1c8, #ffebf3, #e6ebeb, #eeebd5);
      background-size: 400% 400%;
      animation: gradient 20s ease infinite;
      height: 100vh;
  }
  @keyframes gradient {
      0% {
        background-position: 0% 50%;
      }
      50% {
        background-position: 100% 50%;
      }
      100% {
        background-position: 0% 50%;
      }
    }
  header
  {
      z-index: 10;
      backface-visibility: hidden;
      background: inherit;
      transition: 0.4s;
      position: sticky;
      top: 0;
      left: 0;
      width: 100%;
      padding: 1%;
      display: flex;
      gap: 5%;
      box-shadow: 0px 0px 9px rgba(0, 0, 0, 0.637);
  }
  header .logo
  {
      position: absolute;
      left: 5%;
      transition: all 0.2s;
      max-height: 65px;
  }
  header .topper
  {
      transition: ease-in;
      transition-duration: 0.4s;
      color: black;
      text-decoration: none;
      text-transform: uppercase;
      padding-left: 17%;
      letter-spacing: 1%;
      font-size: 50px;
  }
  header ul
  {
      position: absolute;
      display: flex;
      gap: 5%;
      list-style: none;
  }
  header ul li
  {
      padding-left: 4%;
  }
  header ul li a
  {
      transition: ease-in;
      text-decoration: none;
      color: black;
      font-size: 20px;
      letter-spacing: 2%;
  }
  header ul li label
  {
      transition: ease-in;
      font-size: 30px;
      margin-left: 100%;
  }
  header ul li a:hover
  {
      color: rgb(255, 255, 255);
      font-weight: 300;
      border: 2px rgba(255, 255, 255, 0.459);
      text-shadow: 2px 2px 3px rgb(0, 0, 0);
      transition: ease-in;
      font-weight: 200;
      transition-duration: 0.4s;
  }
  header ul li label:hover
  {
      color: rgb(255, 255, 255);
      font-weight: 300;
      border: 2px rgba(255, 255, 255, 0.459);
      text-shadow: 2px 2px 3px rgb(0, 0, 0);
      transition: ease-in;
      font-weight: 200;
      transition-duration: 0.4s;
  }   
  header .topper:hover
  {
      color: rgb(255, 255, 255);
      transition: ease-in;
      transition-duration: 0.4s;
      text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.466);
  }
  div ::-webkit-scrollbar {
      display: none;
  }
  div ::selection {
      background: rgba(255, 207, 144, 0.822);
      color: black;
    }
  div .main
  {
      position: sticky;
      color: white;
      overflow: auto;
      height: 100vh;
      z-index: 0;
      width: 100%;
      background: rgba(0, 0, 0, 0.712);
      padding-left: 13.7%;
      padding-right: 13.7%;
  }
  div.content
  {
      color: white;
      overflow: auto;
      height: 100vh;
      z-index: 1;
      padding-left: 5%;
      padding-right: 4%;
      background: rgba(0, 0, 0, 0.384);;
  }
  div.content p
  {   
      margin-top: 16px;
  }
  div.content h1
  {   
      margin-top: 30px;
  }
  footer
  {
      z-index: 1;
      backface-visibility: hidden;
      background: inherit;
      width: 100%;
      padding: 25px 10%;
      box-shadow: -3px -2px 9px rgba(0, 0, 0, 0.637);
  }
  footer div.footer
  {
      flex-direction: column;
      display: flex;
      list-style: none;;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Lorem ipsum&lt;/title&gt;
          &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js" defer&gt;&lt;/script&gt;
          &lt;script src="Script.js" defer&gt;&lt;/script&gt;
          &lt;link rel="stylesheet" href="Style.css" media="screen" type="text/css"&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;header id="header"&gt;
              &lt;img src="images/MainLogo/logo.png" class="logo" id="mainLogo"&gt;&lt;/img&gt;
              &lt;a href="#" class="topper" id="MainTextIcon"&gt;Lorem ipsum&lt;/a&gt;
              &lt;ul id="ul"&gt;
                  &lt;li&gt;&lt;a href="#" class="webHeader" id="webHeader"&gt;Home&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#" class="webHeader" id="webHeader"&gt;About&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#" class="webHeader" id="webHeader"&gt;Work&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="#" class="webHeader" id="webHeader"&gt;Contact&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;label class="mobileButton" for="hamburger" id="burguerButton"&gt;&amp;#9776;&lt;/label&gt;&lt;/li&gt;
              &lt;/ul&gt;   
          &lt;/header&gt;
          &lt;div&gt;
              &lt;div class="main" id="mainContainer"&gt;    
                  &lt;div class="content" id="contentContainer"&gt;
                      &lt;h1&gt;Lorem ipsum&lt;/h1&gt;
                      &lt;p&gt; Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in tristique nisi. Aliquam ligula mi, euismod id augue sit amet, malesuada pellentesque purus. Sed scelerisque dictum pellentesque. 
                          Nunc tincidunt nibh id mi maximus rutrum ac ut enim. Etiam accumsan diam eget blandit pulvinar. 
                          Mauris scelerisque nisl at magna facilisis vestibulum. Morbi mattis, nunc et vestibulum dignissim, magna odio tincidunt velit, at ullamcorper lacus urna at dolor.
                          Vivamus et tortor nec diam eleifend condimentum. Nunc ut ex vel ligula dapibus scelerisque eget in dolor. Pellentesque congue varius convallis. Curabitur efficitur volutpat orci, nec rutrum magna tempor eget. 
                          Maecenas bibendum hendrerit cursus. Nulla vehicula tristique turpis ac dictum. Vivamus quis lobortis sapien, vel aliquet magna. Suspendisse porta ex eros, at tempor nisl maximus sed.
                          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in tristique nisi. Aliquam ligula mi, euismod id augue sit amet, malesuada pellentesque purus. Sed scelerisque dictum pellentesque. 
                          Nunc tincidunt nibh id mi maximus rutrum ac ut enim. Etiam accumsan diam eget blandit pulvinar. 
                          Mauris scelerisque nisl at magna facilisis vestibulum. Morbi mattis, nunc et vestibulum dignissim, magna odio tincidunt velit, at ullamcorper lacus urna at dolor.
                          Vivamus et tortor nec diam eleifend condimentum. Nunc ut ex vel ligula dapibus scelerisque eget in dolor. Pellentesque congue varius convallis. Curabitur efficitur volutpat orci, nec rutrum magna tempor eget. 
                          Maecenas bibendum hendrerit cursus. Nulla vehicula tristique turpis ac dictum. Vivamus quis lobortis sapien, vel aliquet magna. Suspendisse porta ex eros, at tempor nisl maximus sed.
                          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras in tristique nisi. Aliquam ligula mi, euismod id augue sit amet, malesuada pellentesque purus. Sed scelerisque dictum pellentesque. 
                          Nunc tincidunt nibh id mi maximus rutrum ac ut enim. Etiam accumsan diam eget blandit pulvinar. 
                          Mauris scelerisque nisl at magna facilisis vestibulum. Morbi mattis, nunc et vestibulum dignissim, magna odio tincidunt velit, at ullamcorper lacus urna at dolor.
                          Vivamus et tortor nec diam eleifend condimentum. Nunc ut ex vel ligula dapibus scelerisque eget in dolor. Pellentesque congue varius convallis. Curabitur efficitur volutpat orci, nec rutrum magna tempor eget. 
                          Maecenas bibendum hendrerit cursus. Nulla vehicula tristique turpis ac dictum. Vivamus quis lobortis sapien, vel aliquet magna. Suspendisse porta ex eros, at tempor nisl maximus sed.  
                      &lt;/p&gt;
                  &lt;/div&gt;    
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/body&gt;
      &lt;footer&gt;
      &lt;/footer&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>