I’m currently working on a personal Django project and struggle with styling the base.html with CSS. Ideally, I would like to set a site-wide background image, that covers everything from nav-bar to footer. However, every time I try to incorporate the CSS file in the base.html file nothing seems to happen, although styling isn’t an issue in any other template.
STATIC_URL = ‘/static/’
STATIC_ROOT = os.path.join(BASE_DIR, ‘static’)
"GET /static/css/main.css HTTP/1.1" 404 1665
I got it to work, more or less, by creating the STATIC_DIRS list and appending the
path to the css file. But the result isn’t the one I was hoping for. As of now, the background image is applied to the body element of the landing_page.html template without covering the nav-bar elements or the footer (defined in the body of base.html)
Thanks in advance for all the helpful tips!