4 replies [Last post]
irrrecycle
irrrecycle's picture
Offline
newbie
Canada
Last seen: 2 weeks 6 days ago
Canada
Timezone: GMT-8
Joined: 2016-12-31
Posts: 2
Points: 3

Hi when i view my page locally it works as intended however once uploaded the background is not being displayed. I cannot for the life of me figure out why all names have been checked and all other images are working correctly.

CSS

body {
    background-image: url('images/background.png');
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}
img {
      width: 100%;
      height: auto;
}

HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Irrrecycle &amp; Salvage</title>
<link rel="icon" href="images/favicon.png">
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
    <img src="images/banner.png" alt="Irrrecycle & Salvage Banner">
    <P>Hello? Where are you background?</P>
</body>
</html>

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 hours 50 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9617
Points: 3685

┬┐Huh?

You've already said your page works correctly locally, which is how we'd have to check after constructing the implied directory structure. Give us the link to the non-working, on-line page so we can troubleshoot where the trouble is.

cheers,

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

irrrecycle
irrrecycle's picture
Offline
newbie
Canada
Last seen: 2 weeks 6 days ago
Canada
Timezone: GMT-8
Joined: 2016-12-31
Posts: 2
Points: 3

www.irrrecycle.ca

gary.turner
gary.turner's picture
Offline
Moderator
Dallas
Last seen: 2 hours 50 min ago
Dallas
Timezone: GMT-6
Joined: 2004-06-25
Posts: 9617
Points: 3685

As near as I can figure ...

That file is not in the expected directory. It could be that there is a typo that causes the error. You have the images directory protected, so I can only infer but not directly inspect.

I do find the banner image and the favicon image in the images/ directory but not the background image.

gary

If your web page is as clever as you can make it, it's probably too clever for you to debug or maintain.

ifour.astaj
ifour.astaj's picture
Offline
newbie
Ahmedabad
Last seen: 2 days 34 min ago
Ahmedabad
Timezone: GMT+5.5
Joined: 2017-01-05
Posts: 1
Points: 1

Check file permission of background.png

I can not access file : http://www.irrrecycle.ca/images/background.png.
it is giving You don't have permission to access /images/background.png on this server. so try to give 755 or 777 to background.png and check if it is working or not.

Thanks