Re: html_tables question - Please Help Me!!!
| From: | Justin Patrin | Date: | Mon, 01 Nov 2004 07:05:18 +0000 |
| Subject: | Re: html_tables question - Please Help Me!!! | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15258@lists.php.net to get a copy of this message | ||
On Sun, 31 Oct 2004 08:59:34 -0500, leegold <leegold2@verizon.net> wrote:
> Will anyone please help???
>
> -------- Original Message --------
> Subject: [PEAR] html_tables question
> Date: Sat, 30 Oct 2004 22:34:47 -0400
> From: leegold <leegold2@verizon.net>
> To: pear-general@lists.php.net
> References: <54748422-2AC7-11D9-B705-000A95C91262@erikheerlein.com>
>
> I want a table structure of one cell per row with each row having
> alternating color, so basically I'll end up - if say I have multiple
> rows - with rows of single "boxes" with content inside. It's not exactly
> tabular but it's what I need right now. But I'm having trouble, it
> renders with two (2) cells per row no matter what I try, one cell with
> my content an another skinny one with "N/A". How can I get rid of the
> extra skinny cell? Thanks.
>
> require_once "HTML/Table.php"; // trying the table class
> $table = new HTML_Table("table border=0 cellpadding=10 cellspacing=5");
> // $table -> setAutoGrow(true);
> // $table -> setAutoFill("n/a");
> // $table -> setHeaderContents(0, 0, "Title");
> // $table -> setHeaderContents(0, 1, "URL");
> // $table -> setHeaderContents(0, 2, "Description");
> $hrAttrs = array("bgcolor" => "#D9D9F3");
> $table -> setRowAttributes(0, $hrAttrs, true);
> ....snip....
> $table ->
> addRow(array($t_content.'<p>'.$url_col.'<p>'.$d_content));
> $table->setColAttributes(0, array('class' => 'nameCol')); // do i
> need this?
> $altRow1 = array("bgcolor"=>"#E0FFFF");
> $altRow2 = array("bgcolor"=>"#DAF4F0");
> $table -> altRowAttributes(1, $altRow1, $altRow2);
> echo $table->toHTML();
>
1) Does the snipped code have any HTML_Table calls in it? If so, pelase show it.
2) Are you using autoGrow and autoFill? Try turning them off.
--
paperCrane --Justin Patrin--