From: Paul Lutus Date: 2006-09-12T19:10:39+09:00 Subject: Re: cgi scripts and external css Peter Seidel wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: RIPEMD160 > >>>The problem is not your script per se, it is in the part you don't >>>show -- how you locate it with respect to the CSS file. > > > Both files are in /cgi-bin/ > > http://127.0.0.1/cgi-bin/example.rb > > - -> white background > > http://127.0.0.1/cgi-bin/example.html > > - -> green background Okay. I will try again. Where is the example.css file located? Is it located in the same directory as the example.rb script, or not? IF the example.css file is located in the same directory as the example.rb CGI script, and assuming the script is really emitting the HTML you posted (check using "view source"), the browser will read it correctly. IF, by contrast, the example.css file is NOT located in the same directory as the example.rb CGI script, the browser will NOT be able to find it. So. Where is the example.css file located? You know, you can always create an address for the CSS file that unambiguously identifies its location. Let's say it is located on your server at /styles/example.css. Then you can say: This absolute addressing style is commonly used to avoid the kinds of problems you are having. -- Paul Lutus http://www.arachnoid.com