How can i add a background image to a div

So i want to use a image i have for the background of my body and don’t know how to go about it. I im referring too div class="grid_16 bg_body in the html and .bg_body in the css.

Index.html (489 Bytes)
default.css (198 Bytes)

It should be getting applied. .bg_body is being registered in the CSS as being used. I don’t have hte image but…

Is your image in the right path? The folder hwere your default.css file is…in that folder. Look at it. Is there a folder called"images"? Inside of that images folder, is the bg_body.png image there? Image paths in the CSS file is relative to where the CSS file is.

Yes the path is correct.

Then the image should be showing up. Do you have this site online?

Validate your code first and foremost. Look at your default.css

 background:url(images/bg_body.png) no-repeat center top;

Where is the }?

No its not online and closing the brace didn’t work.

You don’t have anything inside of the .bg_body element so it has 0 height. I thought you minimized your test page for me. Is the page you attached literally your exact page? Because with 0 height to it (no content) then yes nothing will show. Add content to it or (worse) set a height (for testing).

That would be it …

Apologies I should have seen it earlier. Glad it’s fixed :smile: