Dev Helpers
← Back

Input and suffix alignment

Input and suffix alignment with native CSS. The preview includes a small shared demo stylesheet.

Open this example in the interactive library

Source code

<style>
  .demo {
    display: inline-grid;
    grid-template-columns: minmax(0, 6rem) auto;
    align-items: center;
    column-gap: 0.4rem;
  }
</style>
<label class="demo"><input aria-label="Paper width" value="210" /> mm</label>