![]() |
|
Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Html Template CSS and CGI PERLby Anneq (Vicar) |
on Dec 28, 2004 at 14:35 UTC ( #417778=note: print w/replies, xml ) | Need Help?? |
Put a link element in the header of your template file:
You could go a step further and dynamically change your stylesheet by using a template variable for the sytlesheet filename. For even more flexibility, use template toolkit instead of HTML::template. This would give you the ability to put variables in a stylesheet file, which would be processed before rendering to the browser:
In the above example, the main stylesheet is imported, a stylesheet with variables (theme.css) is included, and then additional styles are explicitly added to override those in the first two stylesheets. A drawback with this method is that the styles from theme.css show up when a user looks at the page source, because those styles get embedded in the html document. Anne
In Section
Seekers of Perl Wisdom
|
|