+ Reply to Thread
Results 1 to 7 of 7

Thread: CSS Background Image

  1. #1
    rocky.mcarthur41 is offline x10Hosting Member rocky.mcarthur41 is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    2

    CSS Background Image

    I'm trying to display a background image. On my pc this isn't a problem, when I upload the CSS to the server the image doesn't want to display.

    #content-middle { padding: 0 25px 25px; background: url(../images/wallpaper.jpg) ; }

  2. #2
    lemon-tree's Avatar
    lemon-tree is offline x10 Minion lemon-tree has a spectacular aura about
    Join Date
    Nov 2007
    Posts
    1,420

    Re: CSS Background Image

    Have you uploaded the image to the server too and is it in the correct directory? If that's not the problem, can you provide a link to the page in question.

  3. #3
    callumacrae's Avatar
    callumacrae is offline not alex mac callumacrae is just really nice
    Join Date
    Dec 2007
    Location
    Wellesbourne, England
    Posts
    5,162

    Re: CSS Background Image

    It's working fine here (your site)

    ~Callum
    I can customise your phpBB board. Send me a PM.
    lynxphp - info, tutorials and scripts
    "A forum post should be like a skirt; long enough to cover the subject but short enough to keep things interesting."

  4. #4
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: CSS Background Image

    Wrong Category, moving to programming help
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  5. #5
    krofunk's Avatar
    krofunk is offline x10 Sophmore krofunk is an unknown quantity at this point
    Join Date
    Jul 2009
    Location
    In your socks
    Posts
    211

    Re: CSS Background Image

    you could try using a complete path so rather than

    Code:
    #content-middle { padding: 0 25px 25px; background: url(../images/wallpaper.jpg) ; }
    you could use

    Code:
    #content-middle { padding: 0 25px 25px; background: url(http://www.example.com/images/wallpaper.jpg) ; }
    your code assumes that the images directory is a level up from your site, so in order for your page to display correctly all html files must exist in www.example.com/site/

    using my example means that it doesn't matter where the index.html is...even if the image is on a different server.

    hope this helps

    If I helped you out then don't forget to give me rep

  6. #6
    rocky.mcarthur41 is offline x10Hosting Member rocky.mcarthur41 is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    2

    Re: CSS Background Image

    This site is located at http://euphoriaspa.x10hosting.com/. The image is present and the CSS indicates that. I've also tested on another computer and with Opera which does the same thing.
    Last edited by rocky.mcarthur41; 06-07-2010 at 03:02 AM.

  7. #7
    lemon-tree's Avatar
    lemon-tree is offline x10 Minion lemon-tree has a spectacular aura about
    Join Date
    Nov 2007
    Posts
    1,420

    Re: CSS Background Image

    The image doesn't seem to be present. It is currently looking for http://euphoriaspa.x10hosting.com/images/wallpaper.jpg, which isn't uploaded.
    It looks like you should link it to http://euphoriaspa.x10hosting.com/im...ontent-top.gif
    Last edited by lemon-tree; 06-07-2010 at 06:24 AM.

+ Reply to Thread

Similar Threads

  1. Preload background image
    By Awesomexr in forum Programming Help
    Replies: 4
    Last Post: 12-25-2009, 02:41 AM
  2. Image with white background
    By pasha2k in forum Graphics & Webdesign
    Replies: 8
    Last Post: 10-01-2009, 06:09 PM
  3. Stretching a background image?
    By WhiteOut in forum Programming Help
    Replies: 3
    Last Post: 03-28-2009, 11:37 PM
  4. [java]background image
    By galaxyAbstractor in forum Programming Help
    Replies: 8
    Last Post: 09-13-2008, 02:12 PM
  5. Hmm background image help.
    By Matt. in forum Programming Help
    Replies: 3
    Last Post: 07-21-2008, 01:43 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
x10hosting free hosting for the masses
dedicated servers