Re: PEAR HTML_TABLE package question

From: Date: Mon, 20 Oct 2003 10:45:40 +0000
Subject: Re: PEAR HTML_TABLE package question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8493@lists.php.net to get a copy of this message
Hi Klaus, This is exactly what I was looking for, I tried it and it works great , thanks a lot !!! greetings Ludi --- Klaus Guenther <klaus@capitalfocus.org> wrote: > Hi Ludi, > > The accepted attributes for HTML_Table are the HTML > inline attributes for > the <table>, <tr>, <td>, <th> tags. See the HTML > specifications for that. Of > course, if you use the style="font:12pt Verdana;" > attribute, you can use CSS > properties to define almost anything. > > Here is a version of one of the table examples. I've > reworked it slightly to > use inline CSS: > > <?php > $table = new HTML_Table('width=100%'); > $table->setCaption('256 colors table'); > $i = $j = 0; > for ($R = 0; $R <= 255; $R += 51) { > for ($G = 0; $G <= 255; $G += 51) { > for($B = 0; $B <= 255; $B += 51) { > $table->setCellAttributes($i, $j, > 'style="background-color:'.sprintf('%02X%02X%02X', > $R, $G, $B).';"'); > $j++; > } > } > $i++; > $j = 0; > } > ?> > > The full example, is in cvs: > http://cvs.php.net/co.php/pear/HTML_Page/examples/Page_Complex.php?r=1.5 > > <plug> > HTML_Page, HTML_CSS and HTML_Table all work together > seamlessly. > </plug> > > hth, > > Klaus > > ----- Original Message ----- > From: "Bertrand Mansion" <bmansion@mamasam.com> > To: "Ludi Wang" <groet@yahoo.com> > Cc: <pear-general@lists.php.net> > Sent: Friday, October 17, 2003 6:58 PM > Subject: Re: [PEAR] PEAR HTML_TABLE package question > > > <groet@yahoo.com> wrote : > > > I couldn't find which attributes that HTML_TABLE > > will accept, and which not. There is much > > documentation about it. > > > > I know I can controle the font size of a whole > page > > using a style sheet. And I can use defined style > to > > change the size of a html table if I make the > table > > manually. But how to do this when using HTML_TABLE > ? > > > > An example maybe ? > > You can use any attributes you want. BTW, the > preferred way is to pass them > through an array instead of a string. > > Bertrand Mansion > Mamasam > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com

« previous php.pear.general (#8493) next »