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>
<fieldset>
<div id="container">
<button>Button A</button>
<button>Button B</button>
</div>
</fieldset>
</form>
CSS
form>fieldset:not(:last-of-type) {
display:flex;
flex-direction: column;
}
form>fieldset:not(:last-of-type)>input {
width: 100%;
}
form>fieldset:last-of-type {
display: flex;
flex-direction: row;
}
#container {
width: 30%;
margin: 0 auto;
}