|  |
CSS
Relative and Absolute Paths in Style Sheets
If you use relative paths in your style sheet, Netscape 4.x will incorrectly interpret the paths as being relative to the HTML document to which the style sheet is linked instead of being relative to the style sheet itself. This will work fine if your style sheet is in the same directory as the HTML page, but if you linked your external style sheet to any HTML documents in a different directory, then none of the relative paths will be correct.
If this concerns you because you have a number of visitors coming to your site who still use the ancient version of Netscape 4.x, then you might want to consider using absolute paths instead. Or for smaller sites that do not have directories, move the location of your style sheet to the same directory as your HTML pages (most likely under the root: http://www.yoursite.com/mainstyle.css.
What do absolute paths look like within the style sheet? body { background-image: url("http://www.yoursite.com/graphics/back.gif");}
What do relative paths look like within the style sheet? body { background-image: url("/graphics/back.gif");}
One way to easily remember the difference between absolute and relative paths is to think of absolute as being an absolutely sure way to get to the file if you typed the entire string into your browser address bar.
|
|  |

|