Re: background problems in Netscape 4.7
by Jim <webmaster(at)thedigitalpage.com>
|
Date: |
Sun, 18 Mar 2001 06:40:48 -0800 |
To: |
ErthWlkr(at)aol.com, hwg-basics(at)hwg.org |
In-Reply-To: |
aol |
|
todo: View
Thread,
Original
|
|
At 06:06 AM 3/18/01 , ErthWlkr(at)aol.com tickled the electrons and they
aligned themselves to form these words:
>Hola Friend:
>
>You wrote:
>
> > An absolute URL works fine with NS, however all you need to do is place
> the
> > stylesheet and the html docs in the same directory, or reference all your
> > URLs from the root directory of your server (still a relative URL).
>
>I'm honestly confused now - most bug tables I've read indicate that linked
>style sheets are buggy in NN 4 - nothing mentioned about realtive or absolute
>URLs....
>
>BUT - I'm always willing to learn.... :-)
Let's suppose an imaginary server directory structure that looks like this-
root- the html docs
graphics- the pretty pics
style- the stylesheet(s)
NS references any links listed in an external stylesheet relative to the
html page that calls it. E.g.- for a background image the call might look
like this- background-image: URL(graphics/legalpad_05.gif)
Now Netscape thinks that this image is placed in a directory one level
below the html document (it is), and that the URL is relative to the html
doc location (it also is). This works if the style sheet and the html doc
are both in the root directory (in this example).
If the stylesheet is placed in the directory called style, then the URL for
the graphic would look like this- background-image:
URL(../graphics/legalpad_05.gif), which says: back up to the root
directory, go find the graphics directory and display legalpad_05.gif.
Both URLs are relative. NS expects relative URLs in stylesheets to be
relative the location of the html document, IE expects them to be relative
to the location of the stylesheet.
Placing both the html docs and stylesheet(s) in one directory, or using the
second example of a relative URL shown above should eliminate any problems
NS has with linked stylesheets.
Easy solution: write relative link URLs as you always have and just put the
stylesheet and html docs in the same directory.
That's probably clear as mud. If somebody has a simpler explanation (or if
I've totally hosed this up), please dive in!
Jim Parsons
webmaster(at)thedigitalpage.com
phone: (509) 521-5424
fax: (603) 288-0200
http://thedigitalpage.com/
HTML: hwg-basics mailing list archives,
maintained by Webmasters @ IWA