CSS being linked to local (hard) drive

S

Sitara Lal

When I try linking an empty page to a style sheet (using Format | Style
Sheet Links | Add) which is on the root drive of my web folder, I find that
the link invariably points to my local disk [<link rel="stylesheet"
type="text/css"
href="file:///C:/Documents%20and%20Settings/My%20Documents/My%20Webs/WTC.css
">] rather to the generic web directory.

What causes this and how can I prevent this?

This feature worked fine until earlier this week!

Thanks for your help

SL
 
A

Andrew Murray

use a relative link like

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

(as an example only).
 
T

Thomas A. Rowe

Make sure that you have first opened a web using File Menu | Open Web / Site.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
S

Sitara Lal

Andrew,

Are you suggesting that I should edit the HTML generated by FP2002 (or hand
code the reference to the style sheet)?

If yes, while I can no doubt do that to make the page work, I would still
like to know why does not FP automatically generate a relative link instead
of creating an absolute link to my local drive?

Thanks

SL
 
R

Ronx

....and also that the page has been saved. FrontPage will *always* use
absolute links on a page that has never been saved. When saved, the links
are converted to relative links (provided the page is in an open web).
--
Ron
Reply only to group - emails will be deleted unread.

Thomas A. Rowe said:
Make sure that you have first opened a web using File Menu | Open Web / Site.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================


Sitara Lal said:
When I try linking an empty page to a style sheet (using Format | Style
Sheet Links | Add) which is on the root drive of my web folder, I find that
the link invariably points to my local disk [<link rel="stylesheet"
type="text/css"
href="file:///C:/Documents%20and%20Settings/My%20Documents/My%20Webs/WTC.cs
s
">] rather to the generic web directory.

What causes this and how can I prevent this?

This feature worked fine until earlier this week!

Thanks for your help

SL
 
S

Sitara Lal

Thomas and Ron,

Thanks for your replies to this vexing problem. Does your answer mean that
if I were to create a new page using a page template (which had a style
sheet link as well as an included component linking to another page), then
the new page would be created with absolute links instead of the desired
relative links?

That is exactly what happens when I use a template, which was created
essentially to avoid the repetetive task of identically formatting multiple
pages.

SL
 
T

Thomas A. Rowe

The problem with using a template, is that it is not stored within your current open web and will
always create absolute URLs.

The best option is the create a page, then do not save as a "template" but save under the name
template.htm within the current open web, then when you need to use it, open it and then do Save As
to the name for the new page you want to create.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top