MLUG: Re: [MLUG] universal definition for drive root in html??
Re: [MLUG] universal definition for drive root in html??
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I would recommend the use of relative addressing in any html system of files. Addressing with "file:// ... " may work on a PC but if the files are transferred to a web server everything goes south. Relative addressing assumes any file being called from a web page is relative to that page. So if the page is, say, at /home/www/mysite/thisfile.html, and it calls a graphic image in, say, /home/www/mysite/images/, then the correct address would be "images/imgfile.png" for instance. Suppose stylesheets are in /home/www/css/, then the relative address from that current file would be "../css/default.css" for instance.

This addressing transfers just fine to a CD, btw, assuming all directories and files are copied without changing their addresses relative to each other.

My apologies if you're way ahead of me on this and I'm answering the wrong question.

miker

Mike Miller wrote:
On Mon, 30 Apr 2007, Davis, Jared Scott wrote:

Try just
<link rel="stylesheet" href="/css/x.css" type="text/css" media="all" />
which should reference the root folder - in this case (I think), whatever drive it's on.

Sadly it does not work. Neither does "file:////css/x.css" with any number of slashes (I'm not quite getting the slashes in the "file:" method.)



The <base> tag inside the <head> does the same thing.
e.g., if my css folder is http://www.blah.com/css/x.css I would do
<base href="http://www.blah.com";>
<link rel="stylesheet" href="css/x.css" type="text/css" media="all" />

The problem is to apply that to local files without a web server.

I did happen across this page:

http://help.adobe.com/en_US/InDesign/5.0/help.html?content=WSa285fff53dea4f8617383751001ea8cb3f-6cd7.html


which showed me the use of "file:css/x.css" and also "file:../../css/x.css" and that second solution is working very well for my application, but putting it in root would still be better.


Mike

_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members


_______________________________________________ members mailing list EMAIL:PROTECTED http://mlug.missouri.edu/mailman/listinfo/members