0

I am trying to create a dashboard with python dash and want two or more columns. Unfortunately I always end up with all the content stacked row wise. What am I missing here?

from dash import Dash, dcc, html, Input, Output
import dash_bootstrap_components as dbc


app = Dash(__name__)

app.layout = dbc.Container([
    dbc.Row([
        dbc.Col([
            html.H4('Zeitraum'),
        ], width=6),
        dbc.Col([
            html.H4('Test'),
        ], width=6)
    ]),
    dbc.Row([
        dbc.Col([
            html.H4('Test2')
        ], width=6),
        dbc.Col([
            html.H4('Test3')
        ], width=6)
    ]),
])

app.run_server(debug=True)

enter image description here

1 Answer 1

1

You just have to add an external stylesheet attribute inside your app object, like this:

app = Dash(__name__,external_stylesheets=[dbc.themes.BOOTSTRAP])
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.