in reply to Html Template CSS and CGI PERL

You can include a CSS file with a style tag from your HTML file. How you produce that HTML file (HTML::Template, Template Toolkit, manually, static file) makes no difference. All you have to make sure is that the URL path to the CSS file is correct and that the web browser can see it, maybe you have to use absolute paths. Including CSS works the same way as including images.

And let me just add that using CSS is a very good idea. It can greatly simplify your HTML (templates) and you can make significant design changes without having to touch the templates (or your program) at all.

Replies are listed 'Best First'.
Html Template CSS and CGI PERL
by ana711 (Initiate) on Dec 29, 2004 at 05:00 UTC
    thanks for help but when i tried this it didnot work.I had put css file in link tag saved the template in html folder and called it through cgi script but the css was not implemented .Is this beacuse of mozilla ? or what else has to be done please help ana711
      Can the browser load the CSS file? Just try to type the URL for the CSS file in the browser location bar. If not, the URL is maybe wrong. Do you get any File Not Found (404) errors in your web server log?

      Where did you put the CSS file? It has to be in the web server document root, which is probably not where you keep your HTML templates. Try to put it in the same folder as one of your images and use the same URL path as for that image.

      In addition to Thilosophy's excellent advice, you might get more help if you posted some code, especially the css that is not being implemented.

      Anne