Link to home
Start Free TrialLog in
Avatar of Neo
NeoFlag for Cyprus

asked on

Link to CSS file in a Perl script.

I would like to replace the HTML in an old CGI Perl script, so that it follows the Bootstrap framework.

I would like to know where and how to link to the CSS file from inside the actual script, and not from a template.

Thanks for your help!
SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Neo

ASKER

Hi,


This is taken from the script:
sub writeformheader {
	print("Content-type: text/html\n\n");
	print("<title>Site title</title>");
      print '<BODY BACKGROUND="http://www.domainname/images/bck.gif">';
	print('<FORM ACTION="a.pl" METHOD=POST>',"\n");
	print ("<OL>\n");
}

Open in new window


How shall I add the following line?
<link href="../css/main.css" rel="stylesheet">

Woud this be sufficient?
sub writeformheader {
print("Content-type: text/html\n\n");
print("<title>Site title</title>");
print '<BODY BACKGROUND="http://www.domainname/images/bck.gif">';
print("<link href="../css/main.css" rel="stylesheet">");
print('<FORM ACTION="a.pl" METHOD=POST>',"\n");
print ("<OL>\n");
}

Open in new window




Furthermore, where a class is required such as '<div class="col-md-4">', shall i simly add a backslash before any quotes, and i'm good to go?
<div class=\"col-md-4\">
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial