title: Li contents are rendered outside ul container border
body: <p>In this JsFiddle - <a href="https://jsfiddle.net/9qyv03u3/" rel="nofollow noreferrer">https://jsfiddle.net/9qyv03u3/</a></p>
  
  <p>It looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/Ln1Fz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ln1Fz.png" alt="enter image description here"></a></p>
  
  <p><div class="snippet" data-lang="js" data-hide="true" data-console="false" data-babel="false">
  <div class="snippet-code snippet-currently-hidden">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>ul {
      width: 20em;
      border: 4px solid gray;
      padding: 0.5em 2em;
      margin: 5em auto;
      list-style: None;
      height: 30px;
  }
  li {
      float: left;
      margin: 20px 30px 10px 0;
      border-right-style: dotted;
      padding-right : 15px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul&gt;
      &lt;li&gt;Questions&lt;/li&gt;
      &lt;li&gt;Tags&lt;/li&gt;
      &lt;li&gt;Users&lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I am able to bring the contents inside box by giving <code>ul {height: 40px;}</code> but still the space above menu items are much larger than the space below.</p>
  
  <p>How can I place the menu items inside <code>ul</code> container's center? </p>