Hi guys,
As I’m relatively new in the Web development world, I started to care about the responsivity of my web applications and to help me on this mission, I’m using the amazing Dash Bootstrap Component and trying to set specific sizes for each layout size, but it seems that it’s not being recognized by the browser/CSS (i don’t know)
It only recognizes two different values, in general, the values in lg and md;
Am I doing something wrong or missing something?
I built a reproducible example only to show the bug… I will be very helpful if someone can help me to understand how can I solve it.
# Dash APP
import dash
import dash_html_components as html
import dash_bootstrap_components as dbc
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.GRID]
)
app.layout = html.Div(
[
dbc.Row(dbc.Col(html.Div("A single column",
style={"height": "150px", "background": "yellow", "color": "black", "textAlign": "center", "fontSize": "25px"}),
sm={"offset": 3, "size": 6},
md={"offset": 2, "size": 8},
lg={"offset": 1, "size": 10})
),
dbc.Row(
[
dbc.Col(html.Div("One of three columns",
style={"background": "white", "margin": "16px 0", "height": "100px", "fontSize": "32px", "color": "black"}),
xs=12, width=10, md=6, lg=4),
dbc.Col(html.Div("One of three columns",
style={"background": "white", "margin": "16px 0", "height": "100px", "fontSize": "32px", "color": "black"}),
xs=12, width=10, md=6, lg=4),
dbc.Col(html.Div("One of three columns",
style={"background": "white", "margin": "16px 0", "height": "100px", "fontSize": "32px", "color": "black"}),
xs=12, width=10, md=6, lg=4),
]
),
]
)
if __name__ == '__main__':
app.run_server(debug=True)