Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Trouble with CSS background images

    Hi everyone,

    I'm having trouble getting my css background images to show up.
    All the images are in the images folder off the main root
    What path should I use?

    I've tried
    images/myImage.jpg
    ../images/myImage.jpg
    ./images/myImage.jpg

    any thoughts? It's driving me nuts!

  2. #2
    Join Date
    Mar 2004
    Posts
    688
    Plugin Contributions
    0

    Default Re: Trouble with CSS background images

    Images relating to your css should go in your template images folder. If you're using the default template, then upload your images to includes/templates/template_default/images folder. Same goes if you're using your own template includes/templates/custome_template/images folder

  3. #3
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Trouble with CSS background images

    Hi Marg,

    yeah I tried that but it didn't work. Any other ideas?

  4. #4
    Join Date
    Mar 2004
    Posts
    688
    Plugin Contributions
    0

    Default Re: Trouble with CSS background images

    background-image: url(../images/header_bg.jpg);
    make sure this is how you have you css written

  5. #5
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Trouble with CSS background images

    Yeah, the code is fine, it all works as a stand alone html file.
    I'm wondering where the ../ is taking me. I'm using terra network and they have an unusual file structure (not just the usual htdocs folder). Do you think that this could be the problem?

  6. #6
    Join Date
    Mar 2004
    Posts
    688
    Plugin Contributions
    0

    Default Re: Trouble with CSS background images

    Can I see the site?

  7. #7
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Trouble with CSS background images

    There's not much to see at the moment, mainly cos I'm stuck on this css problem!
    Last edited by Wilbo; 13 May 2009 at 10:48 AM.

  8. #8
    Join Date
    Mar 2004
    Posts
    688
    Plugin Contributions
    0

    Default Re: Trouble with CSS background images

    In looking at your stylesheet you have your background image written like:
    background-image:url(images/bg.jpg);

    change it to be:
    background-image:url(../images/bg.jpg);

    and it should work fine..

  9. #9
    Join Date
    May 2009
    Posts
    43
    Plugin Contributions
    0

    Default Re: Trouble with CSS background images

    OK I fixed the problem, or rather it fixed itself...
    Not sure what happened but it's working now. Maybe server not updating or something

    Thanks for you help anyway Marg

  10. #10
    Join Date
    Mar 2004
    Posts
    688
    Plugin Contributions
    0

    Default Re: Trouble with CSS background images

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

    Nope - as above change it to be just:
    background-image:url(../images/bottomBox.jpg);

    and put your images in your includes/templates/fta_template/images folder

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Trouble with css images
    By cliffecm in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 14 Jul 2011, 12:08 AM
  2. CSS Question - Multiple Background Images
    By voltage in forum Templates, Stylesheets, Page Layout
    Replies: 28
    Last Post: 11 Dec 2009, 09:19 PM
  3. CSS for different page background images
    By jsteelethg in forum Templates, Stylesheets, Page Layout
    Replies: 12
    Last Post: 7 Mar 2007, 12:53 AM
  4. using background images in css
    By jas99villa in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 7 Feb 2007, 10:01 PM

Posting Permissions

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