/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Relative address to link doc to ExtSS

Should we even attempt to use relative addresses when linking an external style sheet to a document, when several other documents that reside in various other directories on the server link to that document?%&!

[U][B]Example Absolute Address:[/B][/U]
<link rel=”stylesheet” type=”text/css” href=”http://hostname/Css/StyleSheet.css“>

[B][U]Doc1:[/U][/B] located in root/dir1.a/ has relative link to Style sheet
<link rel=”stylesheet” type=”text/css” href=”../Css/StyleSheet.css”>

[B][U]Doc2:[/U][/B] located in root/doc2
Contains link that opens Doc1 and style appears (link is “../dir1.a/doc1.html”)

[B][U]Doc3:[/U][/B] located in root/dir1.b/dir2.a/doc3
Contains link that opens Doc1 and style appears (link is “../doc1.html”)

[B][U]Doc4:[/U][/B] located in root/dir1.b/dir2.a/dir3.a/doc4
Contains link that opens Doc1, doc contents comes up but style IS MISSING (link is “…/doc1.html”)

My bad… I thought the relative address was relative to where the document being opened is located, and not relative to all the other documents that open that document.

AM I REALLY SCREWED UP OR WHAT? PLEASE HELP!?

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@TFunkSep 12.2008 — It looks like you have copies of Doc1 in multiple folders. I may be missing something, but it seems like the link to doc1 from doc4 should be "../../../dir1.a/doc1.html".

The link that takes you to a document doesn't affect the stylesheet on the linked-to page.
Copy linkTweet thisAlerts:
@LeeUSep 12.2008 — This link might help.
Copy linkTweet thisAlerts:
@Donna_JSDauthorSep 17.2008 — Thanks for the tip. The information found through the llink you provided helped me a great deal and I am up and running. Thanks again for the boost!?
Copy linkTweet thisAlerts:
@LeeUSep 17.2008 — Glad I could help.
×

Success!

Help @Donna_JSD spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...