How to center the title and an image in streamlit?

I’ve already tried the command below for the title and I couldn’t. For the image, I just managed to center it by increasing the size so that it fills the entire page. Are there any arguments to st.title() and st.image() that allow me to center them?

I tried the code above, but it didn’t work.

title_alignment=
"""
<style>
#the-title {
  text-align: center
}
</style>
"""
st.markdown(title_alignment, unsafe_allow_html=True)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.