title: Why is the navigation bar hidden when I delete "overflow:hidden?" What does overflow do?
body: <p>I started learning html and I'm getting some practice on w3schools.com. I was curious about the <code>overflow: hidden</code> line of code. Why does the whole navigation bar go away when I delete it? I thought overflow was just for hiding scroll bars?</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>ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: #333;
  }
  li {
    float: left;
  }
  li a {
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
  }
  li a:hover {
    background-color: #111;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul&gt;
    &lt;li&gt;&lt;a class="active" href="#home"&gt;Home&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="#news"&gt;News&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="#contact"&gt;Contact&lt;/a&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="#about"&gt;About&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>