Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (2)
As of 2024-04-26 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found