title: HTML/CSS - Border length
body: <p>I'm trying to create a page with 4 sections containing lists of links.  I've set the left and right border on each section to <code>1px solid black</code>.</p>
  
  <p>The issue is these borders only extend to the length of my content.  I haven't been able to find a way to have them extend the full length of the page.  The related topics I've been finding deal with bottom-borders.</p>
  
  <p>Sorry for the long code but I'm not sure how to really shorten it much and still show what is needed:</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>div.container {
    display: inline-block;
    background-color: rgb(0, 56, 0);
    max-width: 100%;
    border: 1px solid black;
  }
  
  a:link {
    color: rgb(0, 68, 255);
    background-color: transparent;
    text-decoration: aqua;
  }
  
  a:visited {
    color: rgb(27, 164, 255);
    background-color: transparent;
    text-decoration: none;
  }
  
  a:hover {
    color: red;
    background-color: transparent;
    text-decoration: underline;
  }
  
  a:active {
    color: yellow;
    background-color: transparent;
    text-decoration: underline;
  }
  
  header.jira {
    padding: 1em;
    color: white;
    background-color: black;
    clear: left;
    text-align: center;
  }
  
  footer {
    padding: 1em;
    color: white;
    background-color: black;
    clear: left;
    text-align: center;
  }
  
  h2 {
    color: goldenrod;
    font-size: 200%;
    text-align: center;
    padding: 10px;
  }
  
  ul {
    color: black;
    list-style-type: disc;
    padding-left: 20px;
  }
  
  section.wiki {
    float: left;
    max-width: 220px;
    border-left: 1px solid black;
    border-right: 1px solid black;
    margin: 1;
    padding-right: 5px;
  }
  
  section.monitoring {
    float: left;
    max-width: 220px;
    border-left: 1px solid black;
    border-right: 1px solid black;
    margin: 1;
    padding-right: 5px;
  }
  
  section.adminui {
    float: left;
    max-width: 220px;
    border-left: 1px solid black;
    border-right: 1px solid black;
    margin: 1;
    padding-right: 5px;
  }
  
  section.other {
    float: left;
    max-width: 220px;
    height: to-bottom;
    border-left: 1px solid black;
    border-right: 1px solid black;
    margin: 1;
    padding-right: 5px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
  
    &lt;div class="container"&gt;
  
      &lt;header class="jira"&gt;
        &lt;h1 style="color: white"&gt;Useful Links&lt;/h1&gt;
      &lt;/header&gt;
  
      &lt;section class="wiki"&gt;
        &lt;h2&gt;Wiki&lt;/h2&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/section&gt;
  
      &lt;section class="monitoring"&gt;
        &lt;h2&gt;Monitoring&lt;/h2&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/section&gt;
  
      &lt;section class="adminui"&gt;
        &lt;h2&gt;AdminUI&lt;/h2&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/section&gt;
  
      &lt;section class="other"&gt;
        &lt;h2&gt;Other&lt;/h2&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="https://somelink.com" target="_blank"&gt;Some Page&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/section&gt;
  
      &lt;footer&gt;footer&lt;/footer&gt;
  
    &lt;/div&gt;
  
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The borders for the <code>monitoring</code> and <code>adminui</code> sections extend all the way down but the <code>wiki</code> and <code>other</code> sections do not causing the lines to not be full the entire length of the page.  Granted I know I can just remove the borders from <code>wiki</code> right and <code>other</code> left and it will look okay but I would like it to be proper in case I have to add more links in the future.</p>
  
  <hr>
  
  <p>How can I make the left and right borders for my sections extend the full length of the page?</p>