Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2007
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problems With Background Images, Again

    I'm sure you've all heard the story before so here's my information. I've tried changing the file type, I've tried doing some other stuff too that was ridiculous... Nothing worked.

    CSS:

    Code:
    body {
    background-image: url('design/images/background.jpg');
    }
    
    #container {
    margin: auto;
    margin-top: 50px;
    width: 700px;
    }
    
    #logo {
    border-bottom: 1px solid #999999;
    float: left;
    padding: 5px;
    width: 50%;
    }
    Page: http://obolopo.com/index.html.
    Background image made in: Fireworks 8.
    Extension: JPEG.

    Thanks in advance.

  • #2
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    When you link to an external css file, relative url's in the css file are taken relative to the css file itself and not to the 'executed' html document.

    You will need to change this in your css
    Code:
    body {
      background-image: url('design/images/background.jpg');
    }
    to this:
    Code:
    body {
      background-image: url('../images/background.jpg');
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •