Hi there,
I’m trying to create a multi-column layout with a scrollable navigation bar in one of the columns (see screenshot and code below). The navigation bar recognizes the overflow and shows a scroll bar at the right but it is not scrollable. I would appretiate if someone could point out to me what I’m missing.
import dash
import dash_bootstrap_components as dbc
import dash
from dash import dcc
import dash_html_components as html
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])
sidebar = dbc.Nav(
[dbc.NavLink("test", href="/page-1") for i in range(30)],
pills=True,
vertical=True,
style={"overflow": "scroll", "bottom": 0},
)
app.layout = maindiv = dbc.Container(
[
dbc.Row(
[
dbc.Col(
[
html.H2("Left Content", className="text-center"),
dbc.Row([sidebar], no_gutters=True,),
],
style={"background-color": "yellow"},
width=3,
xs=5,
sm=4,
md=3,
lg=3,
xl=3,
),
dbc.Col(
[html.H2("Middle Content", className="text-center"),],
style={"background-color": "orange"},
width=5,
xs=1,
sm=3,
md=5,
lg=5,
xl=5,
),
dbc.Col(
[html.H1("Right Content", className="text-center"),],
style={"background-color": "yellow"},
width=4,
xs=6,
sm=5,
md=4,
lg=4,
xl=4,
),
],
no_gutters=True,
),
],
style={
"background-color": "green",
"padding": "0 1rem 0 1rem",
"margin-left": "0",
"margin-right": "0",
"position": "fixed",
},
fluid=True,
)
if __name__ == "__main__":
app.run_server(port=8888, use_reloader=True)