Daniel Masson wrote:
Hi list :

This is maybe a silly question from deamweaver users, i hope you people
understand what i mean.

im working on a site php, smarty,css , etc. the directory structure of
the site is this:

----------------------------------------------------------
- classes
- Files of the smarty class - Templates (Directory)
- template1.html
- template2.html
- template3.html
- dw_template.dwt
script1.php
script2.php
script3.php
style.css
javasc.js
----------------------------------------------------------

script1.php, script2.php, and script3.php look like this

Require "/path/to/smarty/smartyfile.class.php";
$page = new Smarty;
// some stuff
$page->display("templateN.html");
//end

Im working dreamweaver Templates system so every templateN.html are
attached to dw_template.dwt, dw_template.dwt calls the style sheet like
this:

<link rel="stylesheet" href="../style.css" type="text/css">

Of course all the templatesN.html call the style shett the same way. No
problem here. But ... since scriptsN.php need the TemplatesN.html ...
(maybe im wrong with this) the browser doesnt know that
Templates/TemplatesN.html exist, the browser calls
http://site/script1.php
http://site/script2.php

So the browser shouldnt find the style sheet because TemplatesN.html
call ../style.css and ../style.css doesnt exists relative to
http://site/scriptN.php , and for my surprise the output result DOES
apply the style sheet ... Am i wrong with this ??? Or what should i know
about all this ??

Thanks for reading this long and silly question.


Daniel.


Hey,
Say your sytle sheets are in the directory called test but your html files are in test/pages you could simply put this in your html files

<link rel="stylesheet" href="../style.css"
type="text/css">

the 2 periods tell the browser to look one directory back for the file called style.css. Hope that helps.

--
conbud
Graphic & Web Design Using Open Source Technology
--


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to