Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2008
    Posts
    3
    Plugin Contributions
    0

    Default Background image won't display

    All,

    I had a background image which just repeated, it displayed ok. Then it stopped dispalying. Checked my folder permissions they are all at 755. Here is the Code from my style sheet. Any ideas?

    body {
    margin: 0;
    background-image:url(http://www.ontargetairsoft.com/zenC/...ckground.gif);
    background-repeat: repeat;
    }

    Thanks!

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Background image won't display

    The code that is actually in your stylesheet right now is a bit different from what you posted:
    Code:
    body {
    	margin: 0;
    	font-family: verdana, arial, helvetica, sans-serif;
    	font-size: 62.5%;
    	color: #000000;
            Background-Image: URL
    
    (http://www.ontargetairsoft.com/zenC/includes/templates/ontarget/images/background.gif);
    	background-repeat: repeat;
    	}
    Just removing the linefeeds from this makes it work again, but for good form you should also change it to this:
    Code:
    body {
    	margin: 0;
    	font-family: verdana, arial, helvetica, sans-serif;
    	font-size: 62.5%;
    	color: #000000;
            background-image: url(../images/background.gif);
    	background-repeat: repeat;
    	}
    The "url(../images/" means that it will start from the current template in the current shop root directory, so if you copy your site to your local pc for testing it will still work. The full address you have will only work when you are on that address.
    Last edited by gjh42; 24 Mar 2008 at 02:35 AM.

  3. #3
    Join Date
    Mar 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: Background image won't display

    Thanks, I'm starting to get it.

    I took the whole URL(http://www.....) and replaced it with (../images/background.gif); It works now.

    How does the CSS know the whole file path?

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Background image won't display

    That's part of the inner workings of CSS. You and I only need to know that it does it.

    The . is used in various file-handling programs to symbolize something like "the parent or root of where you are now".
    Last edited by gjh42; 24 Mar 2008 at 03:50 AM.

 

 

Similar Threads

  1. v150 css problem - my background-image won't show
    By Kathy_ in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 20 May 2012, 11:43 PM
  2. Header Image Won't Display
    By starmakersandy in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 1 Nov 2010, 09:40 AM
  3. captcha-combo-in-one-1.0 won't display image
    By ykaldes in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 20 Aug 2009, 05:57 AM
  4. Background image won't display
    By bgroup99 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 30 Nov 2007, 05:21 PM
  5. background image won't repeat
    By Fred9V in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 1 Mar 2007, 01:54 AM

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