By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,908 Members | 2,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,908 IT Pros & Developers. It's quick & easy.

CSS/CGI Configuration

P: n/a
Hi all

I'm doing my first CSS with a CGI, and I'm haivng some configuration problems.
I'm on a Mac, Panther.

I've got a CGI that prints a head with "@import url" to connect to a
stylesheet. The
web page comes out fine, but without the stylesheet applied.

The CGI is in the systemwide cgi-bin
(/Library/WebServer/CGI-Executables), and I've
tried the stylesheet in both the systemwide web documents folder, and
my own local
web folder. Same effect - zip. I've tried little variations on the
import (slashes, etc), to
no effect. I've been advised that the @import is the correct method
(although I have no
experience here).

If I save the source of the page to a file in my local web folder, and
simply open it up as a
static page, the CSS is applied as it should be. No trouble there.

The Apache log gives me complaints about the imported file not
existing, and one
weird one about not being able to find a file called cpan.css. What the dilly?

Mike
--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
in comp.infosystems.www.authoring.stylesheets, Mikey wrote:
The web page comes out fine, but without the stylesheet applied


URL?

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #2

P: n/a
After serious contemplation, on or about Friday 29 April 2005 5:25 pm
ex***********************@earthlink.net wrote:
Hi all

I'm doing my first CSS with a CGI, and I'm haivng some configuration
problems. I'm on a Mac, Panther.

I've got a CGI that prints a head with "@import url" to connect to a
stylesheet. The
web page comes out fine, but without the stylesheet applied.

The CGI is in the systemwide cgi-bin
(/Library/WebServer/CGI-Executables), and I've
tried the stylesheet in both the systemwide web documents folder, and
my own local
web folder. Same effect - zip. I've tried little variations on the
import (slashes, etc), to
no effect. I've been advised that the @import is the correct method
(although I have no
experience here).

If I save the source of the page to a file in my local web folder, and
simply open it up as a
static page, the CSS is applied as it should be. No trouble there.

The Apache log gives me complaints about the imported file not
existing, and one
weird one about not being able to find a file called cpan.css. What the
dilly?

Mike

Did you use the escape character "/" in front of the "@" character? Try
"/@import "myfavorite.css: unless you are using the format"
print qq~
<html>
<body>
</body>
</html>~;

--
Later,
Darrell Stec da*****@neo.rr.com

Webpage Sorcery
http://webpagesorcery.com
We Put the Magic in Your Webpages
Jul 21 '05 #3

P: n/a
On 2005-04-29 17:23:38 -0400, Lauri Raittila <la***@raittila.cjb.net> said:
in comp.infosystems.www.authoring.stylesheets, Mikey wrote:
The web page comes out fine, but without the stylesheet applied


URL?


What I have is essentially

print '<style type="text/css" title="text/css">
<!--
@import url("the_stylesheet.css");
-->
</style>';

But where should the stylesheet be located?
--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #4

P: n/a
>>
I've got a CGI that prints a head with "@import url" to connect to a
stylesheet. The
web page comes out fine, but without the stylesheet applied.

The CGI is in the systemwide cgi-bin
(/Library/WebServer/CGI-Executables), and I've
tried the stylesheet in both the systemwide web documents folder, and
my own local
web folder. Same effect - zip. I've tried little variations on the
import (slashes, etc), to
no effect. I've been advised that the @import is the correct method
(although I have no
experience here).

If I save the source of the page to a file in my local web folder, and
simply open it up as a
static page, the CSS is applied as it should be. No trouble there.

The Apache log gives me complaints about the imported file not
existing, and one
weird one about not being able to find a file called cpan.css. What the
dilly?

Mike

Did you use the escape character "/" in front of the "@" character? Try
"/@import "myfavorite.css: unless you are using the format"
print qq~
<html>
<body>
</body>
</html>~;
--


Thanks, but no joy. I put my snippet above.

It seems like doing a print '<stuff>'; in my cgi is not the
best method. I was thinking of using CGI.pm .
--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #5

P: n/a
On 2005-04-30 02:33:52 -0400, Darrell Stec
<da**********@webpagesorcery.com> said:
After serious contemplation, on or about Friday 29 April 2005 5:25 pm
ex***********************@earthlink.net wrote:
Hi all

I'm doing my first CSS with a CGI, and I'm haivng some configuration
problems. I'm on a Mac, Panther.

I've got a CGI that prints a head with "@import url" to connect to a
s


I suddenly realized that I may have two problems here, or a problem of a
different sort.

My Apache log gives me this:
[client 127.0.0.1] File does not exist: /Library/WebServer/Documents/cpan.css
[client 127.0.0.1] File does not exist: /Library/WebServer/Documents/cpan.css
[client 127.0.0.1] script not found or unable to stat:
/Library/WebServer/CGI-Executables/the_stylesheet.css
[client 127.0.0.1] script not found or unable to stat:
/Library/WebServer/CGI-Executables/the_stylesheet.css

Now what could "cpan.css" be? It's not a file referenced by my CGI or
my stylesheet. Is
there a CPAN pm that needs to be installed, and some file put up in my
web page folder?
--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #6

P: n/a
On 2005-04-30 02:33:52 -0400, Darrell Stec
<da**********@webpagesorcery.com> said:
After serious contemplation, on or about Friday 29 April 2005 5:25 pm
ex***********************@earthlink.net wrote:
Hi all

I'm doing my first CSS with a CGI, and I'm haivng some configuration
problems. I'm on a Mac, Panther.

I've got a CGI that prints a head with "@import url" to connect to a
s


Okay, it looks like there was a css file used for the cpan website; why Apache
is looking for it is beyond me. My browser did not have a default stylesheet
selected.

I set the default stylesheet to my CGI's, and that worked fine. Then I put the
browser back to no default, and that ended the references to cpan.css in the
Apache log. Weirdness.

However... I cannot get the @import url to work, and I figure it must be either
some fundamental setup problem with Apache.

I can get the following to work:
<link rel="stylesheet" type="text/css"
href="http://localhost/the_stylesheet.css" />

But naturally I don't want to have hard references in my CGIs.

Please excuse me as I tend to ramble in my posts. A decade of bad habits.
Mike

--
"It's beyond my ken... and my Barbie, and all of my action figures."

Jul 21 '05 #7

P: n/a
On 30/04/2005 14:29, Mikey wrote:

[snip]
print '<style type="text/css" title="text/css">
I don't think that text/css is a very good name for your style sheet.
The value of the title element may be presented to the user so they can
choose between alternate style sheets, so the name should be meaningful.

If you only have one overall style for the document, you could do away
with the title attribute altogether.
<!--
It is not necessary, nor really desirable, to "hide" SCRIPT or STYLE
element content anymore. This particular technique was necessary in the
past, but not any longer.
@import url("the_stylesheet.css");
[snip]
But where should the stylesheet be located?


In the same location you would expect if that were a link: the directory
of the current document. Probably /cgi-bin/, which I doubt is the most
appropriate location for a style sheet.

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 21 '05 #8

P: n/a
Mikey wrote:

What I have is essentially
print '<style type="text/css">
@import url("the_stylesheet.css");
</style>';
But where should the stylesheet be located?


If you use full path from the DocumentRoot to the CSS file, it will
work. You are starting from the current directory which is
../cgi-executable/ and your CSS file is not there, obviously.
From your other posts I'd say the path should be
"/the_stylesheets.css". That is, you have put the stylesheet in the
DocumentRoot.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jul 21 '05 #9

P: n/a
in comp.infosystems.www.authoring.stylesheets, Mikey wrote:
Please excuse me as I tend to ramble in my posts. A decade of bad habits.


As you also didn't give URL, consider yourself not excused and plonked.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more HTML / CSS Questions on Bytes