[thelist] CSS: background images not working

Chris W. Parker cparker at swatgear.com
Thu May 23 12:28:01 CDT 2002


> The syntax looks correct, its a little hard to troubleshoot without a
> URL though. The only thing I can think of is that you are providing a
> relative URL based on the location of the HTML document rather then
> the style sheet.

ooookkkkk.... so are you saying that i need to reference the image from
where the stylesheet is located and not from where the document that the
picture is appearing in is located?

i'm doing this on my home computer and am using frontpage to create
"webs" out of directory's off the root. so for example...

/ - root
/css - where my xhtml/css test site is located
/css/styles/default2.css - where the .css file is located
/css/images/bgs/bg2.gif - where the background file is located...

since the index.asp file is in the /css directory (/css/index2.asp) and
my .css file is in the /css/styles directory (/css/styles/default2.css)
i should reference the background like this?

background-image: url(/css/images/bgs/bg2.gif);

whereas before i was doing this...
background-image: url(/images/bgs/bg2.gif);

i was doing that because i thought the webserver would realize that /css
was the root of that web and not the actual root of the whole site i.e.
/

(i think i just got a little confusing there...)

anyways, i think the problem is that i was referencing it wrong. i'll
try it when i get home later, or *maybe* at work.


thanks,
chris.

p.s.

> HTML email is a bit like using coloured paper and glitter ink on a CV.

what's a CV?



More information about the thelist mailing list