I am trying to set my background image of the page via CSS using the following code, but no image shows up. The image will be tiled on the page and is only 10x10px big. Nonetheless, it still doesn’t show up. Please can you tell me what I am doing wrong?
<body>
<div id="background"></div>
</body>
#background {
background-image: url("img/background.png");
}
Is the image in
linkToCssFolder/img/background.png? The image path is relative to your CSS file.Also, does your
#backgrounddiv have content in it? If not, it will probably have the default0pxheight, and not show any background.