rjsaulakh has asked for the wisdom of the Perl Monks concerning the following question:
i am new to cgi and the problem i am facing is that all my include files as well as images are getting aligned to left but i want them in center of the page . would preferably want to have a table format and put all my navigatyion header, footer and brand image inside it . how should i go about it any suggestive reading
the most osrry part of it that i have to use CGI.pm and nothing else as that is only what i available on the server and its not possible to install new modules "
#!/usr/bin/perl use CGI; my $cgi=new CGI; print $cgi->header; $region = $cgi->param("region"); print <<HERE; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html lang="en-GB"> <head> <title>website HERE print <<HERE1; </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-88 +59-1"> <link href="../css/style.css" rel="stylesheet" type="text/css"> <script type="text/javascript" language="JavaScript"> var num=randIntNum(); </script> </head> <body> HERE1 #navigation header come here print &printer('../navigation/de_nav_bar.html'); print <<HERE2; <table cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"> <td> HERE2 #brand background image comes gere print <<HERE3; <table cellpadding="0" cellspacing="0" width="100%"> <tr valign="top"><img src="images/DE_1_2_2_BKG_Fine_Dining.jpg" al +ign ="center"> <td> HERE3 # navigation footer comes here print &printer('../navigation/de_template_footer.html'); sub printer { my $a=shift; open(F,$a) or die("$a not opened\n"); my $b; { local $/; $b=<F>; } return $b; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: cgi script for html pages
by bradcathey (Prior) on Dec 15, 2005 at 15:52 UTC | |
Re: cgi script for html pages
by wazzuteke (Hermit) on Dec 15, 2005 at 15:57 UTC | |
Re: cgi script for html pages
by tphyahoo (Vicar) on Dec 15, 2005 at 15:49 UTC | |
Re: cgi script for html pages
by larryp (Deacon) on Dec 15, 2005 at 21:12 UTC |
Back to
Seekers of Perl Wisdom