Hi all, I am having a hard time linking a css file to a template when using the HTML::Template Module. Here is what i have: 1) myserver/cgi-bin folder, which has all the .pl files. 2) myserver/html folder, which has the template, CSS and html files the template files have extension .tmpl If i call an external CSS file like below: It doesnt work, but if i embed the same CSS code in the: then it works fine. I have tried my best, and i dont want to give up on it. Please help. Thankyou so much. Rakesh Gupta
Try giving <link rel="stylesheet" href="./test.css" type="text/css" /> see the "./" or even test with the absolute path and see what is going wrong and step down to the actual path that is relative to the page requesting css.
thanks Shabbir, I got a reply from another forum and now it works for me, what you gotta do is to provide the url instead of a path (absolute or relative - both didnt work for me) below is the code: if the css file is in the /var/www/html folder and the css file is style.css the code will look like: hope it helps others Rakesh Gupta
Thats the way to specify the absolute URL but for relative one you can use "./" and "../" to achieve the same. You can check the source code of the current page and you will see the relative css is linked.