Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

External stylesheet doesn't seem to have any effects

Hi, I’m following this guide to use an external stylesheet, but it doesn’t seem to have any effects. For example setting the background color or text color to red to see that it works, but nothing changes.

I have external_stylesheets = [ link to a css file on github... ] , and app = dash.Dash(__name__, external_stylesheets=external_stylesheets).

Not sure where could have gone wrong. Any suggestions are useful!

Could you share with us the link you are trying to add?

Yes of course, it’s essentially the same file from the guide ( and just put it on github that’s all. You can find the file here dashcss/bWLwgP.css at main · peilinUWU/dashcss · GitHub. I just added

* {
  background-color: red;

to see if it takes effect.

Are there any errors on the browser console? I suspect that it could be something related to the mime type, so perhaps setting type="text/css" explicitly in the external_stylesheets could fix this problem (if that’s actually the issue).

I gave it a try but nothing has changed. I added the following:

external_stylesheets = [
        'type': "text/css"

Ok… is there an error in the browser console?