Issue with the alignment of text within Streamlit buttons

Hello everyone!
I am experiencing an issue with the alignment of text within Streamlit buttons. Specifically, I am using Streamlit version 1.16.0, and have also tried upgrading to the latest version with no success. Despite trying various CSS styling options, the text within the button still does not align center.

Thank you in advance for any help or guidance on this issue.

Bildschirmfoto 2023-04-04 um 16.02.19

Hi @ufry, welcome to the forum!

Could you please share a reproducible code snippet that shows this issue? That certainly is not the normal behavior of Streamlit buttons, and it seems like you may have some code changing the CSS of your buttons, or you may have some setting in your browser that is causing the issue.

Here is a normal streamlit button on the current latest version of streamlit (currently 1.20). Does it look centered to you?

Here is how it looks on my computer
image

1 Like

Thank you for your quick response!
You were right, there was a CSS file manipulating the streamlit app.

1 Like

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