title: Apply display:flex to a form
body: <p>I'm trying to apply display:flex on this form and failing. The structure of the HTML cannot be changed and I can't for the life of me figure out how to go about it.
  The only way they all inline (including the button) is to apply flex on both the form <strong>and</strong> .form-fields. But when the form wraps, the button stays in the first row, while the input field for the last name goes into second.</p>
  
  <p>What am I doing wrong? And what can I do with CSS only, without touching the HTML? Thank you!</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>form, .form-fields {
    display: flex;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="form"&gt;
    &lt;form&gt;
      &lt;div class="form-body"&gt;
        &lt;ul class="form-fields"&gt;
          &lt;li class="form-field"&gt;
            &lt;div class="input-container"&gt;
              &lt;span class="name_first"&gt;
                &lt;input type="text" name="first_name" id="first_name" value="" placeholder="First Name *" required=""&gt;
              &lt;/span&gt;
              &lt;span class="name_last"&gt;
                &lt;input type="text" name="last_name" id="last_name" value="" placeholder="Last Name *" required=""&gt;
              &lt;/span&gt;
            &lt;/div&gt;
          &lt;/li&gt;
          &lt;!--  name and last name --&gt;
  
          &lt;li class="form-field"&gt;
            &lt;div class="input-container"&gt;
              &lt;input name="email_address" id="email_address" type="email" value="" placeholder="Email *" required=""&gt;
            &lt;/div&gt;
          &lt;/li&gt;
          &lt;!-- email adress --&gt;
          &lt;li class="form-field"&gt;
            &lt;div class="input-container"&gt;
              &lt;input name="phone_number" id="phone_number" type="tel" value="" placeholder="Phone *" required=""&gt;
            &lt;/div&gt;
          &lt;/li&gt;
          &lt;!--  phone --&gt;
        &lt;/ul&gt;
        &lt;input name="action" type="hidden" value="Request an Info Sheet"&gt;
      &lt;/div&gt;
      &lt;div class="form-footer"&gt;
        &lt;button type="submit" class="form_button"&gt;
          &lt;span&gt;Contact Us&lt;/span&gt;
        &lt;/button&gt;
      &lt;/div&gt;
      &lt;!-- button --&gt;
    &lt;/form&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>