Css Side-by-side input text

Is there a way via css to make to text input items sit next to each other 50%?
I found I can have it fit for a particular size screen but when using top margin ext… but the sizing is not consistent.

Looking for something like this

You will likely run into issues trying to change it for different screen sizes, it will be a headache. Containers do work for some cases, but not all, especially overlays.