Button alignment and responsive isnt work

Hi All !
I´m a new user streamit and I´m havng trouble to put two buttons side by side, first button always aligned left and other always align rigth.

Another problem is that it’s not working on cell phone dimensions



I´m using this code:

    col1, col2, col3 = st.columns([1,1,1])

    with col1:

    with col2:

    with col3:

Does anybody help me ? Thanks

Hi Ricardo,

unfortunately (as far as I know), there’s no way to change the alignment of a column. If you could, you could use only two columns and align the first left and the second right.

There might be a slightly “hacky” way to do it though. I recently had a similar problem

… and found this video helpful:

Hope that helps.

Thanks for replying lasinludwig!
This is the problem I see with Streamlit, CSS “hacks”

Take a look at my “New Features” post, it talks a bit about this kind of improvement.

See it’s a basic thing that Streamlit itself could solve.

Besides that the responsiveness doesn’t work 100%
I noticed that below 640px and for some elements in the case the buttons they did not respond.