Answers for "how to line up inputs to labels using flexbox"

1

how to line up inputs to labels using flexbox

<style>
.wrapper{
    display: flex;
    justify-content: flex-end;
}

.wrapper label{
    flex: 1;
}
.wrapper input{
    flex: 2;
}
</style>

<form>
  <div class="wrapper"><label>The Label</label><input type='text'/></div>
</form>
Posted by: Guest on May-21-2021

Code answers related to "how to line up inputs to labels using flexbox"

Browse Popular Code Answers by Language