Gif Background Help

Help! I tried putting a gif to a background image, but when I try on Notepad++, it only show on top of the text…here it is:Hexahedron Rotation FEZ can someone help me? Also, this is from Google so when i try to put it from my folder on PC, it won’t work as well. :frowning:

  <p>Some textual content</p>


div {
    width: 100px;
    height: 100px;
    background-image: url(url_to_image);

Thanks! I’ll try it today!

1 Like

Ok, so do I have to make a CSS file and put it there or put it on the div…

Ideally, a separate CSS file, yes. Alternatively, an embedded style sheet in the HEAD of the document.

Oooooohhhhh…so put the CSS file in the same folder as HTML?

It can be in the same folder though for better organization, it could be in its own CSS folder.


A style sheet file contains only CSS, and nothing else.

See the examples below for embedded and external style sheets:


    /* css selector rules */


  <link href="css/style.css" rel="stylesheet">

I’ll try my best! :smiley:

1 Like