I want to achieve a very simple goal: I have a line - text aligned to left and a button to right. And I want the text to be vertically aligned to button's label. I tried to play with padding, margins,... but nothing worked. I believe there is a simple and smart solution I am missing.
Plunker demo:
https://plnkr.co/edit/KwRF2uOmKc3aPFQW9DXn?p=preview
<div>
<span>
This text should match the "Submit" text
</span>
<button type="button" class="btn btn-secondary float-right">Submit</button>
</div>
Thank for your answers.
Bootstrap 4 is based on flexbox, so already has classes for applying those alignment utilities.
d-flex
makes the container a flex container, andalign-items-center
does the vertical alignment. Try something like: