|
Posted by Steve on 01/12/06 11:46
> The command 'require' works really great, but it doesn't work with a shared
> .css file.
Because "require" is a PHP command, not an HTML command.
> I've a .css file called 'default.css' also in 'D:\WWW\scripts'. But it
> doesn't get loaded.
> <link rel = "stylesheet" type = "text/css" href =
> "D:\WWW\scripts\default.css">
The href attribute is called from the client browser, which has no idea
where your server's D: drive is.
> If I put 'default.css' into the same directory where my php file with the
> command 'require' is located then it works if I use
> <link rel = "stylesheet" type = "text/css" href = "default.css">
Because the browser can make a legal request for it when it is in the
same folder as the HTML document.
> But I'd like to have my .css files also at a shared place.
Yes, as long as the href attribute tells the browser where to find it.
e.g.
<link rel="stylesheet" type="text/css"
href="http://www.example.com/stylesheets/default.css" />
> Is there also something like a 'require' command for a .css file?
No, but you could use some browser-side javascript to confirm that the
..css document was loaded.
---
Steve
Navigation:
[Reply to this message]
|