0

So I would like to have the background of the body be one gif that fills the entire thing. It won't show up.

<style type="text/css">
    body{
        width:100vw;
        height:100vh;
        background-image: url("The More You Know1.gif");
        background-size: cover;
    }
</style>
cyborg86pl
  • 2,597
  • 2
  • 26
  • 43
  • 2
    probably, your link is wrong. your link is not correct(spaces are not allowed) and hence you are not getting the gif outputted. – Abhishek Bhagate May 29 '20 at 20:55
  • Does this answer your question? [href syntax : is it okay to have space in file name](https://stackoverflow.com/questions/4172579/href-syntax-is-it-okay-to-have-space-in-file-name) – A. Meshu May 29 '20 at 20:55

1 Answers1

0

Spaces don't work in the title of assets. Replace all spaces in the image name with %20 in your CSS, or change the file name to feature underscores or hyphens in the place of each space.

Fix #1

background-image: url("The%20More%20You%20Know1.gif");

Fix #2

Change the file name to TheMoreYouKnow.gif and update your CSS accordingly.

If the file still doesn't load, check your file structure to make sure that your GIF is located in the same directory as your index.html file. If it isn't, you need to navigate to it in your css like this:

background-image: url("/images/The%20More%20You%20Know1.gif");
  • Thanks very much. It did not work at first but, when I reloaded the document It did. (: -a random person on the internet. – SmollBirb123 May 29 '20 at 21:12