Center button st.button

How to center the button ? thanks

Hey @DATAtourism,

Have you seen this post that centres an image by using st.beta_columns ?

Happy Streamlit-ing!
Marisa

1 Like

Thanks @Marisa_Smith. It’s really useful to me. Just putting it in a way easier to copy :stuck_out_tongue:

import streamlit as st 
import cv2 img = cv2.imread('photo.jpeg') 
st.image(img, use_column_width=True, caption='Random image for sizing') 
st.title("Off center :(") 
col1, col2, col3 = st.beta_columns([1,1,1])
col2.title("Centered! :)") 
col2.image(img, use_column_width=True)

Screenshot

1 Like

Lovely! Thanks @vijaysaimutyala