JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<fieldset>
<legend>A form</legend>
<label for="text">A label</label>
<input id="text" placeholder="A text input" />
</fieldset>
<div>
<button>Button A</button>
<button>Button B</button>
</div>
<fieldset class="flex">
<button>Button A</button>
<button>Button B</button>
</fieldset>
</form>
CSS
form>fieldset:not(:last-of-type) {
display:flex;
flex-direction: column;
}
form>fieldset:not(:last-of-type)>input {
width: 100%;
}
div, fieldset.flex {
display: -webkit-flex;
display: flex;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-justify-content: center;
justify-content: center;
}