4 replies [Last post]
Kirbs
Kirbs's picture
Offline
Regular
UK
Last seen: 27 weeks 4 days ago
UK
Timezone: GMT+1
Joined: 2007-05-20
Posts: 11
Points: 0

This is quite hard to explain so I'll try and keep it simple.

How I've got my files structured is like this: I've got my Home, Downloads, Events, Links and Photos HTML files in the public_html folder. Now I'm in the process of adding a few photo galleries but want them to be links from the Photos.htm page. The html photo galleries are in public_html/gener8r/photogalleries. The links from the Photos page to the respective galleries work, however the stylesheets do not.
The CSS does work though if I put the particular photo galleries in the public_html folder.

I'm wondering what do I have to do for the page to accept CSS code a few folders away from public_html? I know it must be possible as I was using the Javascript SimpleViewer and the html file for this was in public_html/gener8r/css/simple_viewer.

This is in public_html and the CSS works [the gallery doesn't but that's another mission]

Gener8r.net

23rd September 2006

Hover pointer over thumbnails to see the enlarged version.


Image

Caption

This however doesn't and is in public_html/gener8r/photogalleries.

Gener8r.net

April 21st 2007

If you need any more code, please say.

Thanks.

Tags:
Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 2 weeks 2 days ago
London
Timezone: GMT+1
Joined: 2004-06-06
Posts: 15659
Points: 2797

You just need to traverse

You just need to traverse back up through the directories until you are sitting at the same level as gener8r. you use the dotted notation to back up one level thus '../' or use an absolute reference from your root web document directory by prepending '/' to the path.

Moving this post to 'Off Topic' as it's not a CSS question.

Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

Kirbs
Kirbs's picture
Offline
Regular
UK
Last seen: 27 weeks 4 days ago
UK
Timezone: GMT+1
Joined: 2007-05-20
Posts: 11
Points: 0

so instead of

so instead of /gener8r/css/template.css I've put ../css/template.css

Thanks, seems simple now.

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 2 weeks 2 days ago
London
Timezone: GMT+1
Joined: 2004-06-06
Posts: 15659
Points: 2797

Yes but you didn't have

Yes but you didn't have /gener8r in the examlpes you had simply gener8r/ which would only work if you were already in the root directory.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

mccyclone
Offline
newbie
ank
Last seen: 5 years 25 weeks ago
ank
Joined: 2009-04-29
Posts: 1
Points: 0

i couldn't do it :S how was

This comment has been moved here.