Dash layout rendering differently on another computer

I’m referring to the CSS layouts of the dash. I’ve extracted the initial portion of the app.layout of the code. It renders correctly on my desktop, but not my work computer.

I intend to have the 3 graphs in a single row, each graph taking up 4 columns. But this is only so on my desktop, and when I transfer the code to my work computer, all the graphs are vertically stacked.

className = "four columns" is in the dcc.Graph call, and className = "row" is in the html.Div call

I’m puzzled as to why there can be a different output, even with the same code. I’ve ensured that the package versions across both computers are the same.

Could it be that the work computer has a firewall that is stopping you from linking the CSS? What happens if you download the CSS file and place it in the assets folder?

1 Like

Oh my, that’s absolutely it!!!
Thank you very much.

1 Like

My dash layout wasn’t working when I’m using
external_stylesheets = [dbc.themes.BOOTSTRAP]

This resolved my issue:

external_stylesheets = [‘https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css’]

!!!

@tcbegley I am having a similar issue. I have all the css styles written in style.py. Where can I download the CSS file from?

hi @gaganjot
are you referring to this css above? https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css

Worth noting that the file linked above is slightly out of date these days. You can get an up to date link by firing up Python and running

print(dbc.themes.BOOTSTRAP)
1 Like