I’m trying to set a .gif as a background for a webpage I’m working on. I’ve tried a few different things to make it work but no matter what I still just get the default white background.
Just a heads up if there are any major discrepancies in my css or html, its because I’m doing this to practice frontend development, and I’m still rather new to it.
body{
background-image: url(bg.gif);
background-color: black;
background-position: center;
background-size: cover;
color: green;
font-family: 'Courier New', Courier, monospace;
}
this is what I have at the moment, I’ve tried a few similar things including using an png image but nothing has worked. I don’t know if I need to link it with hugo or add something to my baseof.html, everything else in my styles css has worked fine. oh also i tried a div on the html page but that also didn’t work
3
Answers
try to check your html if, you already link your css properly or put some height and width to your css