Justifying or Centering Text on Streamlit

Hi, is it possible that you can implement in future updates a way of centering or justifying streamlit/markdown text?

For example, when I write an about section of my app, I think it will look really neat if we were able to justify the text.

Thanks, keep up the awesome work!

Hi @wlpretorius,

You can try to put your text into a html component and then add style tags.

<div style="text-align: center"> your-text-here </div>

st.markdown also also allows html tags, but using the html component above is the prefered way I believe.

3 Likes

Thanks so much for the reply, I am still a newbie with HTML, but will I will try that.

1 Like

Hello @maarten-betman, if I want to add a variable in the streamlit page using your process then how to do it?