Hi Monks I have been trying to link an external css to my run mode but have been unsuccessful so far. I have tried three ways of doing it 1. directly in template file like so..

<LINK REL=StyleSheet href="file:///C:/Program Files/Apache Software Fo +undation/Apache2.2/cgi-bin/myapp/templates/basic.css" TYPE="text/css" + MEDIA=screen>

2. declared as template var in runmode and used TMPL_VAR in path above in template file

sub browse : Runmode { my $self = shift; my $template = $self->load_tmpl("browse_form.html"); $template->param (CSS => 'file:///C:/Program Files/Apache Software + Foundation/Apache2.2/cgi-bin/linkmotor/templates/basic.css'); + return $template->output; }

3. Declated in runmode like so..

$self->query->start_html( -style => {'src'=>'http://www.mystyle.com/st +yles/style.css'} );

The problem is that when I view source in the first 2 ways, I see the linking with css path and when I copy source and save it as a dummy html file, it works - the styles take over. Why then it doesn't recognize css via calling the runmode? Thanks in advance for your help.


In reply to CGI::Application run mode does not recognize external css by Prat824

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.