I\'d like to use an image file as a background-image on Django
. But I do not know how.
First, I read this and tried to write like following this in a css file.
hello I had some problems I used pycharmS as tool this how I managed to solve the problem obviously you have to load static in your html file and setup your settings.py for
if all have be done well but the issue is on css file
your image is in folder called img which is under static folder
YOU HAVE TO DO LIKE THIS :
background: Url("../img/myimage.jpeg")
; this is the part of your image
don't put all settings code of the background on the same line
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
YOU USE BROWSER LIKE CHROME TO OPEN YOUR PROJECT I USED MICROSOFT EDGE NO CHANGE ON MY PROJECT HAS BEEN APPLIED SIMULTANEOUS