I have a css called styles in my static folder
and this is how I call in my script the css
app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP,dbc.icons.BOOTSTRAP])
how do I map this style.css to the external_stylesheets? (I need to do this)
If you place
styles.css in a folder called
assets dash will automatically include it. Note that you also need to include
__name__ when you instantiate the app:
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP,dbc.icons.BOOTSTRAP])
See more info here:
I know dash works with the static foldier… but this q is because I deployed the app in the web, and need to map the css (and dont know how to map it in dash)
You can directly map the url in the external_stylesheets section. Hopefully this will solve the issue for you.
@jinnyzor hi, can you do an example please? (this might be usefull for others)
app = dash.Dash(name, external_stylesheets=[dbc.themes.BOOTSTRAP,dbc.icons.BOOTSTRAP, ‘http://linktoyourstylesheet’])
You can also do the same thing with external scripts.
works! check out my web app www.pokerutils.com