.form-row { display: flex; justify-content: space-between; margin-bottom: 1em; } .form-field { display: flex; flex-direction: row; /* changed this from column */ align-items: center; /* added this to vertically align elements in the row */ justify-content: space-between; /* added this to put some space between the label and the input field */ width: 275px; /* optionally set a width to keep it consistent */ } .content-container { max-width: 500px; /* adjust the max width as per requirement */ /* this line centers your container */ margin: 20px 0px 0 20px; padding: 0 20px; /* bit of padding so content doesn't touch the edges */ }