My flexbox won't center
<p>I'm currently trying to learn how to make websites, I just started to test out flexbox but I cant figure out how to center the red box:</p>

<p><img src="https://i.stack.imgur.com/YF0v2.png" alt="(See picture)"> </p>

<p>I looked at a very clear guide (<a href="https://css-tricks.com/snippets/css/a-guide-to-flexbox/" rel="nofollow noreferrer">https://css-tricks.com/snippets/css/a-guide-to-flexbox/</a>) and I figured I just had to use justify-content: center. But I am cleary doing something wrong please help.</p>

<p>P.S. Run the snippet in fullscreen, otherwise you won't see the problem.</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: 0px;
  padding: 0px;
}
.flex_container {
  display: flex;
  flex-flow: row wrap;
  border: 5px solid blue;
}
header,
section,
footer,
aside,
nav,
article {
  display: block;
}
body {
  justify-content: center;
  border: 5px solid grey;
}
#top_menu {
  text-align: center;
  width: 100%;
  height: 40px;
  padding: 10px;
  border: 5px solid green;
}
#top_menu li {
  list-style: none;
  font: 20px helvetica;
  color: green;
  display: inline;
}
main {
  padding: 20px;
  max-width: 1000px;
  border: 5px solid red;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="flex_container"&gt;
  &lt;nav id="top_menu"&gt;
    &lt;ul&gt;
      &lt;li&gt;Tab 1&lt;/li&gt;
      &lt;li&gt;Tab 2&lt;/li&gt;
      &lt;li&gt;Tab 3&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/nav&gt;
&lt;/div&gt;
&lt;main&gt;
  Sample text
&lt;/main&gt;</code></pre>
</div>
</div>
</p>