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.