html – Stacked inputs with rows using flexbox


.stacked-inputs,
.stacked-inputs .row {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    -ms-flex-align: center;
    align-items: center;
}
.stacked-inputs .row {
    width: 100%;
    margin-bottom: 10px;
}
.stacked-inputs > input,
.stacked-inputs .row > input {
    position: relative;
    -ms-flex: 1 1 0%;
    flex: 1 1 0%;
    min-width: 0;
}
<div class="stacked-inputs">
  <input type="text" placeholder="First name">
  <input type="text" placeholder="Last name">
</div>

<br /><br />

<div class="stacked-inputs">
  <div class="row">
    <input type="text" placeholder="First name">
    <input type="text" placeholder="Last name">
  </div>
  <div class="row">
    <input type="text" placeholder="Job title">
    <input type="text" placeholder="Year started">
  </div>
</div>