Re: HTML/Table - colspan problem

From: Date: Sun, 16 Nov 2003 18:02:45 +0000
Subject: Re: HTML/Table - colspan problem
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8975@lists.php.net to get a copy of this message
<addw@phcomp.co.uk> wrote : > On Fri, Nov 14, 2003 at 02:43:23PM +0100, Klaus Guenther wrote: >> Alain Williams wrote: >>> Hi, >>> >>> I want to have a table where the first row of header spans all rows (ie as >> a 'title'). >>> >>> My code is: >>> $table = new HTML_Table('border=1 align=center >> caption="Existing Promotions"'); >>> $table->addRow(array('Existing Promotions'), >>> "colspan=7", >> "TH"); >> >> try: >> >> $table->setCellContents(0,0,'Existing Promotions', "th"); >> $table->setCellAttributes(0,0,'colspan="7"'); > > No, that was one of the variations that I tried. > > It is recognising 'colspan', but just doesn't output it into the HTML. Look at > the HTML > that is generated: > > > <table border="1" align="center" caption="Existing > Promotions"> > <tr> > <th align="center">Existing Promotions</th> > <!-- span --> > <!-- span --> > <!-- span --> > <!-- span --> > > <!-- span --> > <!-- span --> > </tr> > <tr> > <th align="center">Promo</th> > <th>Start</th> > <th>End</th> > > <th align="right">Save</th> > <th align="right">Qty</th> > <th>Description</th> > <th align="center">Number<br>of SKUs</th> > </tr> You probably have setCellAttributes or something like that in your code where it should be updateCellAttributes. Set will overwrite all you attributes. Bertrand Mansion Mamasam

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