title: Position item at the bottom of the container with css
body: <p>What I'm trying to do is be able to position bottom h1 at the bottom of the h2 box it's in. I used the bottom: 0; but it is going to the bottom of the screen instead of the h2 box I'm trying to position it in. Asking because I've looked for a bit on how to do this and all I can see is people using the bottom:0;</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>* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
  }
  
  body {
    height: 1000px;
  }
  
  header {
    box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.3);
    top: 0;
    position: sticky;
    background-color: white;
    height: 8vh;
  }
  
  nav {
    min-height: 10vh;
    margin: auto;
    width: 90%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  nav h1,
  nav ul {
    font-size: 1.3rem;
    flex: 1;
    position: relative;
    bottom: 10px;
  }
  
  nav ul {
    list-style: none;
    display: flex;
    justify-content: space-between;
    position: relative;
    bottom: 10px;
  }
  
  nav a {
    text-decoration: none;
    color: black;
    letter-spacing: 2px;
  }
  
  main section h2 {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    position: relative;
  }
  
  main section section h1 {
    font-size: 1.3rem;
  }
  
  .home {
    background-image: linear-gradient(to right, darkcyan, cyan);
  }
  
  .project {
    background-image: linear-gradient(to right, rgb(219, 0, 0), rgb(238, 0, 0))
  }
  
  .contact {
    background-image: linear-gradient(to right, goldenrod, gold);
  }
  
  .bottomer {
    background-color: rgb(87, 87, 87);
    height: 10vh;
    padding: 30px;
    position: absolute;
    bottom: 0;
  }
  
  .middleText {
    font-size: 2rem;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://fonts.googleapis.com/css2?family=Roboto&amp;display=swap" rel="stylesheet"&gt;
  
  &lt;header&gt;
    &lt;nav&gt;
      &lt;h1&gt;
        Practice
      &lt;/h1&gt;
      &lt;ul&gt;
        &lt;li&gt; &lt;a data-page="home" href="#"&gt;Foo&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt; &lt;a data-page="project" href="#"&gt;Foo&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt; &lt;a data-page="contact" href="#"&gt;Foo&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/nav&gt;
  &lt;/header&gt;
  
  &lt;main&gt;
    &lt;section data-index="0" class="home"&gt;
      &lt;section&gt;
        &lt;h1 class="bottomer"&gt;
          Bottom
        &lt;/h1&gt;
      &lt;/section&gt;
      &lt;h2 class="middleText"&gt;Fooer&lt;/h2&gt;
    &lt;/section&gt;
    &lt;section data-index="1" class="project"&gt;
      &lt;h2 class="middleText"&gt;even more foo&lt;/h2&gt;
    &lt;/section&gt;
    &lt;section data-index="2" class="contact"&gt;
      &lt;h2 class="middleText"&gt;fooiest&lt;/h2&gt;
    &lt;/section&gt;
  &lt;/main&gt;</code></pre>
  </div>
  </div>
  </p>