Hi Sat,
As far as I heard the horizontal Layout is one of the next big features of streamlit which will come with one of the next versions in the next days/weeks (at least I hope ).
See also here:
So maybe just wait some more days until the feature is live and you don’t need to work with some hacks to make the horizontal layout work?
Best,
Alex