Have you tried making the elements regular blocks and giving their parent a display: flex style?
display: flex