Issue
I use following code:
app.layout = html.Div([dbc.Row([dbc.Col("left", width = 2, style={'background-color': '#ADD8E6'}), dbc.Col("right", width = 10)])])
if __name__ == "__main__":
app.run_server(debug = True)
Then, I get following pages:
How can I make the blue color extend to the whole left part? (right now it only fill one line.) Thanks.
Solution
You can style the dbc.Row
with style={"height": "100vh"}
as follows:
from dash import Dash, html, dcc
import dash_bootstrap_components as dbc
app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
app.layout = html.Div([dbc.Row([dbc.Col("left", width = 5, style={'background-color': '#ADD8E6'}),
dbc.Col("right", width = 5),
],
style={"height": "100vh"})],
)
app.run_server(debug=True, use_reloader=False)
Output:
Answered By - Hamzah
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.