Hi all,
How do I vertically center FontAwesome icons in a cell of a datatable? My datatable is styled in a way where text will be centered vertically. However, FontAwesome icons are not following the styling rules. I’ve tried playing around with CSS (I’m not too knowledgeable on CSS) and I could not get it to work properly. A screenshot of the issue and the simplified code is below:
table = dash_table.DataTable(
id='table1',
style_header={
'textAlign': 'left',
'backgroundColor': 'rgb(235, 235, 235)',
'color': 'black',
'fontWeight': 'bold',
'height': '45px',
'whiteSpace': 'normal'
},
style_data={
'textAlign': 'center',
'whiteSpace': 'normal',
'height': '55px',
'lineHeight': '13px',
},
markdown_options={"html": True},
sort_action='custom',
sort_by=[{'column_id': 'Rank', 'direction':'asc'}],
hidden_columns=['Division'],
fixed_columns={'headers': True, 'data': 1},
fixed_rows={'headers': True, 'data': 0},
style_table={'minWidth': '100%', 'minHeight': '750px', 'height': '750px', 'maxHeight': '750px', 'overflowY': 'auto'},
merge_duplicate_headers=True,
cell_selectable=True,
Any help would be greatly appreciated!