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 5 of 5
  1. #1
    New Coder
    Join Date
    Aug 2012
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question Background Image not appearing?

    Hello,

    I am having an issue with a background image on one of my pages, and it's driving me nuts!

    The page in question is here: http://enhancedigital.co.uk/seo.html

    I have developed this page using notepad++, and when I have been testing the pages on my local machine with Firefox, the background image has been displaying correctly. However, when I uploaded the page via FTP and visited the site, the image would not show up.

    Any ideas would be greatly appreciated!

    Thanks

  • #2
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    http://enhancedigital.co.uk/images/seoBG.jpg - file not found.

    You need to come back up a level (relative to the css file):

    Code:
    background-image:url("../images/seoBG.jpg");
    Added: Actually the first link looks correct, so maybe you just haven't uploaded the image.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #3
    New Coder
    Join Date
    Aug 2012
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Wow, thanks for replying so quickly!

    Could you explain in a little more detail? I'm pretty useless when it comes to this kind of stuff!

    I have the seoBG.jpg image saved in the images folder, as with all other images. I have tried several different filenames in the CSS e.g.

    background-image:url(images/seoBG.jpg);
    background-image:url(./images/seoBG.jpg);
    background-image:url(../images/seoBG.jpg);

    ...and the same again with the directories surrounded by ' and ", but no luck. All other images are displaying correctly so far.

    Thanks!

  • #4
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    Perhaps just upload the file via FTP again. Try clearing your browser cache.

    Is the file extension .jpg correct..
    Last edited by AndrewGSW; 08-06-2012 at 05:09 PM.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  • #5
    New Coder
    Join Date
    Aug 2012
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts
    I have found the issue, the image saved in images folder was correct, but the filename was all lower case (seobg.jpg). In the CSS, the filename was seoBG.jpg.

    I renamed the image file and it now appears correctly. I had no idea that was taken into account, lesson learnt!

    Thanks for helping!


  •  

    Tags for this Thread

    Posting Permissions

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