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; }

In reply to cgi script for html pages by rjsaulakh

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.