External stylesheet stopped working suddenly?

meithan

Member
Messages
32
Reaction score
0
Points
6
Hi.

I use an external stylesheet to control the apprearance of some site-wide things. One week ago it worked just fine, but for the past couple days the pages are simply not picking up the stylesheet. I don't remember changing anything.

Here's my stylesheet, located in cgi-bin/styles.css

Code:
body {
	background-color: rgb(245, 245, 220);
}

table.main {
	border-width: 1px;
	border-spacing: 0px;
	border-style: solid;
	border-color: white;
}
table.main td {
	border-width: 1px;
	border-spacing: 0px;
	border-style: solid;
	border-color: white;
	padding: 4px;
	background-color: rgb(255, 255, 240);
}
table.main tr.header td {
	background-color: rgb(255, 255, 102);
}
table.main tr.r0 td {
	background-color: rgb(242, 242, 242);
}
table.main tr.r1 td {
	background-color: rgb(231, 231, 231);

In the HTML files i'm using the following:
HTML:
<head>
<link rel="stylesheet" type="text/css" href="cgi-bin/styles.css">
</head>

The background of every page should be pale yellow, and tables should have the formatting specified.

I wrote this simple test HTML file and it doesn't pick up the styles either:

HTML:
<html>
<head>
<link rel="stylesheet" type="text/css" href="cgi-bin/styles.css">
</head>
<body>
The background should be pale yellow!
</body>
</html>

What am I doing wrong? What perplexes me is that it worked just fine last week.

Thanks.
 
Last edited:

meithan

Member
Messages
32
Reaction score
0
Points
6
Thanks, lemon-tree. I tried your suggestion but it still wouldn't work. Then I tried moving the stylesheet to the webroot, where the website html files reside. That worked.

One weird thing is that I had to use a relative path of "../styles.css" in the scripts. My website's index.html contains a two-frame frameset. One frame is a fixed html file, but the other is produced by calling a script (in /cgi-bin) which dynamically generates the HTML code for the second frame. What is weird is that, while the script runs in /cgi-bin (and thus "../styles.css" is correct from that viewpoint), the HTML code it generates will ultimately be located in the same place as index.html, the webroot. The script doesn't use the stylesheet of course, it simply outputs the corresponding HTML tagline. Any insight on what's going on there?
 
Top