title: Pseudo-elements and flexboxes in CSS
body: <p>I am learning CSS and I am seeing something I don't understand. I am essentially doing the following:</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>.flexbox {
    display: flex;
  }
  
  div.flexbox::after {
    display: block;
    content: "X";
  }
  
  .item {
    flex: 1;
    height: 200px;
  }
  
  .red {
    background-color: red;
  }
  
  .blue {
    background-color: blue;
  }
  
  .green {
    background-color: green;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="flexbox"&gt;
    &lt;div class="item red"&gt;&lt;/div&gt;
    &lt;div class="item blue"&gt;&lt;/div&gt;
    &lt;div class="item green"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I would have expected the "X" to appear on a new line, given that it is a block-level element. However, it is appearing inline -- at the end of the row of divs. </p>
  
  <p>I am using firefox 52.7.4 for what it's worth.</p>
  
  <p>Any insights would be appreciated.</p>
  
  <p>Thanks</p>