Booststrap Component not work properly on other client's browser

Boostrap works well on my chrome, but others. And they don’t have python installed on their system.
Take the follwing codes for example, someone just get a string on the page without light green backgound.
It seems that boostrap component not work on other computer.

import dash
import dash_bootstrap_components as dbc

app = dash.Dash(
    external_stylesheets=[dbc.themes.BOOTSTRAP]
)

app.layout = dbc.Alert(
    "Hello, Bootstrap!", className="m-5"
)

if __name__ == "__main__":
    app.run_server(host='0.0.0.0', port=80)

Been solved. It’s caused by “external_stylesheets”. Computer that are not connected to Internet have no chance to download stylesheet. And that will make page layout not render correctly.

1 Like

You could consider downloading the Bootstrap CSS and serving it locally if users have access to your app over a network but not the public internet. E.g. put it in the assets/ folder (see here).

1 Like