in reply to Re: CGI and CSS
in thread CGI and CSS

Thank you. I'm using chrome so I went to the Tools section and then Development Tools and it says "Failed to load resource: the server responded with a status of 404 (Not Found)". This shows up twice and underneath one is the website for the CSS file and the other is for the image, and both are the correct website. I even typed it into the address bar and it gets me to those files. I just don't understand why it's not displaying the image correctly once the cgi is called.

Replies are listed 'Best First'.
Re^3: CGI and CSS
by marto (Cardinal) on Mar 04, 2014 at 17:53 UTC

    "I just don't understand why it's not displaying the image correctly"

    Clearly the path is not correct in relation to where this file is being served from. If the webserver says 404, the file you're looking for isn't available at the location you have requested. Had you changed the src/href to be the full http address to the file (which you say works) you could see your page working. If you want to make life easy for yourself error logs, debugging ....

    Take the time to learn the basics of the tools you have chosen to work with, Tutorials->CGI Programming->Ovid's CGI Course. Returning invalid HTML is also a sure fire way to confuse matters.