.input-grid { float: left; display: grid; column-gap: 10px; row-gap: 5px; align-items: center; width: 100%; } .input-grid * { margin-top: 0; margin-bottom: 0; } .input-grid .last-item { text-align: right; } legend { float: left; width: 100%; margin: 0; padding: 0; line-height: 1.5em; margin-top: 0.25lh; margin-bottom: 0.25lh; } fieldset { border: 0; } fieldset > *:last-child { margin-bottom: 8px; } body:not(:-moz-handler-blocked) fieldset { display: table-cell; } input[type="checkbox"] { width: min-content; margin-left: auto; margin-right: auto; } input[type="radio"] { position: inherit; }