✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🐇 Announcing Dash VTK for 3d simulation graphics. Check out the March webinar.

Possible to Update/Overwrite html tag styles with CSS inline?

I want to change the styles for the <body> tag (like changing the margins so my content doesn’t begin to the left of the visible screen area). However I’d prefer not to create and upload a css file that has 1 line of code in it. Is there no command that would be like dcc.css.update_style({body:margins = 0}) or something to that effect?


It’s easy to use a css file. You can create the code on https://codepen.io and then use the following code in Python.

    'external_url': 'https://codepen.io/the_url_you_get.css'

Or you can put the css code into a file in your assets folder to use local css file (Example: Including Local CSS and JavaScript).