Forums

[resolved] Background Image Simply Won't Appear with CSS (4 posts)

  1. chaseman
    Member
    Posted 1 year ago #

    I have this line of code in my CSS

    body { background-image: url ('images/bg2.png'); background-repeat: repeat-y; background-position: center top; }

    But the background image simply will not show up no matter what I try, I've tried it on my local server and on my shared hosting server, I've tried it on both system with a relative URL and with an absolute URL.

    Adding a background-color will work, but the image itself will simply not show up. I really don't know what the reason for this could be.

    You can have a look at my template that I'm working on at: http://www.chasenotes.net

    Any suggestions what the reason for this problem could be?

  2. kmessinger
    Member
    Posted 1 year ago #

  3. John Hawkins
    Member
    Posted 1 year ago #

    chaseman, the issue is the space right after url. try this:
    background-image: url('images/bg2.png');

  4. chaseman
    Member
    Posted 1 year ago #

    Wow I broke my head the last half a hour over a simple space, I can't believe this, thanks to you John Hawkins!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.