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
    May 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    BG image doesn't display in files is live

    I have used an excellent HTML5 template which uses JS to display background images. However while this works locally it doesn't when published. The site structure is sound and I notice this happens with the source files I downloaded also so it's nothing I have done in my build which could have caused this.

    This is the link to my site, everything is fine except the background image not showing.

    http://www.khawkinsdesign.com

    Any ideas, as I say fine locally, not fine when published?

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,748
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello KJoe,
    This is probably a path issue since I can see twilight.jpg when I use an absolute path. It does not work from your js as a relative path though.

    Try this - { "image" : "../img/bg/twilight.jpg", "color" : "#a9a9a7" },

    or just this { "image" : "/img/bg/twilight.jpg", "color" : "#a9a9a7" },

    or an absolute path. That would at least verify the js is going to load the image at all - { "image" : "http://www.khawkinsdesign.com/img/bg/twilight.jpg", "color" : "#a9a9a7" },

    See absolute/relative paths here.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    New Coder
    Join Date
    May 2012
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I haved checked the path, altered it to your suggestions but still this doesn't work. Would it be a js issue? As I say it works locally fine just not live...

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Looks like your prettyphoto javascript and CSS files are returning 403 forbidden to the browser. Did you upload those files? Or do you have some kind of htaccess preventing access to those files?
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    Senior Coder DJCMBear's Avatar
    Join Date
    Mar 2010
    Location
    United Kindom
    Posts
    1,173
    Thanks
    14
    Thanked 136 Times in 136 Posts
    The OP has posted this in the Javascript forum also where I have also told the OP what the issue with the files are, due to them not even existing in the file/folder tree.
    Official BinPress hand picked coder.
    For anyone worried about SQL injection go have a look at my small yet powerful script here.
    Go Pledge for Light Table, if it hit's $300,000 Python and other languages will get added.
    I am 1 of 65,608 people to get a Pebble Watch :P


  •  

    Posting Permissions

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