Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

Where to place dbc.Navbar within app.layout?

$
0
0

Hello everyone!

As I am trying dash-bootstrap-components v1.0 for the first time, I found myself wondering where exactly I should place dbc.Navbar within the layout of my app.

My first attempt was the following:

app.layout = dbc.Container([
    navbar, 
    pages_content
], fluid=True)

But this results in the navbar not occupying the full width of the screen, which I don’t like.

The other option I found is this:

app.layout = html.Div([
    navbar,  
    dbc.Container([
        page_content
    ], fluid=True) 
])

This results in the navbar occupying the full width of the page.

What is the recommended way to place the navbar? Thanks for help!

@tcbegley

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles