HighDots Forums  

How can a css in a folder read a pics in another folder

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss How can a css in a folder read a pics in another folder in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stanimir Stamenkov
 
Posts: n/a

Default Re: How can a css in a folder read a pics in another folder - 05-01-2004 , 07:49 AM






/Jorntk/:

Quote:
I have css in a folder name css. so how can this .css file read a pics file
from another folder eg, pics/a.jpg.

Both css folder and pics folder are located in a folder named project.

I know i can call the pic by url(project/pic/a.jpg)
If the above statement is placed in a "project/css/the.css" file
(for example) the URI for the "a.jpg" would resolve to
"project/css/project/pic/a.jpg". You should use 'url(../pic/a.jpg)'
if you have:

project/
css/the.css
pic/a.jpg

<http://www.w3.org/TR/CSS21/syndata.html#uri>:

Quote:
For CSS style sheets, the base URI is that of the style sheet, not
that of the source document.
--
Stanimir


Reply With Quote
  #2  
Old   
Jorntk
 
Posts: n/a

Default How can a css in a folder read a pics in another folder - 05-01-2004 , 10:28 PM






I have css in a folder name css. so how can this .css file read a pics file
from another folder eg, pics/a.jpg.

Both css folder and pics folder are located in a folder named project.

I know i can call the pic by url(project/pic/a.jpg)

However, its very inconveninet when I change the folder name eg from project
to project10.

so, are there any other way to do this?

Please advice. Thanks!






Reply With Quote
  #3  
Old   
Tim
 
Posts: n/a

Default Re: How can a css in a folder read a pics in another folder - 05-03-2004 , 09:41 AM



On Sat, 1 May 2004 19:28:13 -0700,
"Jorntk" <jorntk (AT) yahoo (DOT) com> posted:

Quote:
I have css in a folder name css. so how can this .css file read a pics file
from another folder eg, pics/a.jpg.

Both css folder and pics folder are located in a folder named project.

I know i can call the pic by url(project/pic/a.jpg)

However, its very inconveninet when I change the folder name eg from project
to project10.
Two ways:

1. Use relative links. Back out of a folder using ../ into the parent, the
append the new name onto the end of it.

e.g. Given some files located at:

/an/example/here.test
/an/other/example.test

The first one (here.test) could refer to the second (example.test)
with a link like "../other/example.test".

2. Use absolute links. All links include the full path to the destination,
starting with a slash / to indicate the root.

e.g. Given those same files as before, they'd each have links using the
full path to the other. The first would refer to the second with a link
like "/an/other/example.test".

Depending on what you mean by changing a folder name, you're in for a hard
time. If you rename things, you've got to make quite a lot of changes on
anything else that referred to it.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.