First, I have to declare that below are my own opinion only.

Second, I would like to give you a pure HTML sample for a 2x2 table.

<table border=0  cellborder=0 width=100% cellspacing=1 cellpadding=1>
<!-- border and cellborder are for NS and IE -->
<tr>
<td valign=top><div align=left>Col 1 Row 1</div></td>
<td valign=center><div align=center><font size=+3>Col 2 Row
1</font></div></td>
</tr>
<tr>
<td valign=bottom><div align=right><font point-size=12> Col 1 Row
2</font></div></td>
<td><div align=center><font size=-2 face="Sans Comic MS">Col 2 Row
2</font></div></td>
</tr>
</table>

Third, I would say, CGI.pm can handle simple <tag></tag> with quite fair
quality,
but it should not for a table. Code will be so ugly and hard to debug.
Imagine what will
be the code looks like if there are table2 inside table1, while table 3
inside table 2 and
Table3's first row want to span 2 column, while table 3 have 4 column. So I
recomment
you to write in this way :

print <<"HTML";
<html>
<body ..... >
    <!-- Some HTML Code -->
</body>
</html>
HTML

So, reserve CGI.pm for just handling Form data process and header
printing and whatever functions, beside Table and Frame.

Rgds,
Connie

----- Original Message -----
From: "jmpond" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 06, 2002 2:18 AM
Subject: perl cgi and html table td tags..


Hello List,

Here is my issue.  Trying to use perl/cgi script to build a table in a form.
Building the table is straight forward as the code snippet below works.  The
problem is -- How do I set up the code to align cell 1 right and align cell
2 left? Or more generally how do I set up the code to apply different HTML
attributes to individual cells?

print $q->table((
  {-cellpadding=>"5", -cellspacing=>"0", -border=>"1", -width=>"100%"},
 $q->Tr({-align=>'center'}, [
  $q->td([" this is cell 1","this is cell 2"]),
  $q->td({-align=>"left"},[" this is cell 3"])])));

After that I will want to set up different font faces in each cell so any
info on that would be helpful too.

Thanks in advance for helping.

Joe Pond



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to