Apologies for what I'm sure is a very stupid mistake I'm making, but can
anyone please tell me why the following correctly displays the background
image:
<head>
</head>
<body style="background-position: center bottom; background-attachment:
fixed; background-image: url(../images/skylinelogo.gif); background-repeat:
no-repeat">
but the following doesn't:
<head>
<link href="../includes/css/default.css" type="text/css"
rel="stylesheet" />
</head>
<body>
</body>
The contents of default.css is as follows:
body
{
margin-top: 0px;
font-family: Verdana;
font-size: smaller;
color: Blue;
background-image: url(../images/skylinelogo.gif);
background-attachment: fixed;
background-repeat: no-repeat;
background-position: center bottom;
}
The relative path to the stylesheet is definitely correct, because I can
change the color: Blue element to something else and the difference appears
correctly.
Any assistance gratefully received.
Mark
From your code, your folder structure appears to be as follows:
____________________
| | |
pages images includes
| | |
page.html skyline.gif css
|
default.css
Your html body code works because you are moving out of the pages folder and
into the images folder to pick up your gif file.
However your css is trying to use the folder structure:
____________________
| | |
pages images includes------------
| | | |
page.html skyline.gif css images**
| |
default.css skyline.gif*
and trying to find the gif file * in the images** folder
Try changing the css line:
background-image: url(../images/skylinelogo.gif);
to
background-image: url(../../images/skylinelogo.gif);
or use an absolute path rather than a relative one (eg:
www.mysite.com/images/skyline.gif)
hope that helps
Phil