Hi,
I have read documentation on how to style tables but i feel it is not complete. How do i adapt my code below to change font, and how much space my table takes up? I do not know how to style my tables properly. I would like to change to font, and add some cushioning on the left and right side so it doesn’t just stretch across the whole page.
Below is some of my code… pls can someone tell me how i change font in table?
app.layout = html.Div(
className="row",
children=[ html.Div(
id="dash-logo",
children=[html.Img(src=app.get_asset_url("logo.png"))]
),
html.Div("Data",style={'display': 'inline','position':'absolute','margin-right': '-50%',
'top': '15px','font-family': 'Sans-serif','left': '50%'}),
html.Div(
dash_table.DataTable(
id='table-paging-with-graph',
columns=[
{"name": i, "id": i} for i in sorted(Data.columns)
],
page_current=0,
page_size=10,
page_action='custom',
filter_action='custom',
filter_query='',
sort_action='custom',
sort_mode='multi',
sort_by=[]
),
style={'height': 250, 'overflowY': 'scroll','font-family': 'cursive'}, ####<------ this does not work
className='six columns',
),
html.Div(
id='table-paging-with-graph-container',
className="five columns",
),
html.Div([
dcc.Graph(id='graph-with-slider'),
dcc.Slider(
id='year-slider',
min=Data['Monthn'].min(),
max=Data['Monthn'].max(),
value=Data['Monthn'].min(),
marks={str(month): str(month) for month in Data['Monthn'].unique()},
step=None
)
])
],
)