Hello guys, how i can change the colour of the first line of the table?
put orange colour in header of table, “Number of Users”, “Bank Movements”, “Detected Frauds”
Hello guys, how i can change the colour of the first line of the table?
put orange colour in header of table, “Number of Users”, “Bank Movements”, “Detected Frauds”
Hello @Tiago_Galvao,
Assumin you only have one table, you can change the color of the header of your table by integrating css like the following:
header_style = '''
<style>
th{
background-color: orange;
}
</style>
'''
st.markdown(header_style, unsafe_allow_html=True)
However if you want to change the color of the first row of your table you can use :first-child
like the following:
header_style = '''
<style>
table tbody tr:first-child td {
background-color: orange;
}
</style>
'''
st.markdown(header_style, unsafe_allow_html=True)
Let us know if it helped.
Hello mate, thank you for your answer, but how i can implement this code in my python file??
@Tiago_Galvao you can simply add the code to your python file the same way it’s given.
If you have a problem with that, feel free to share the code of your file.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.