Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Fix for Netscape 4.x bgcolor probs


  • You cannot reply to this topic
No replies to this topic

#1 majorsky

  • Community Member
  • 1 posts
  • Real Name:patrick
  • Location:Sac Area, CA

Posted 23 May 2003, 00:05

Hope someone finds this useful!

In Netscape 4.x browsers, the TD background colors only show when the TD tag is populated by data or non-breaking space tag ( ) tag. Unfortunately the infoboxes class only provides TD tags for products it sees. The result is the possibility that the TABLE background will show if there's no TD tags to make up for inconsistent table row (a row with less TDs than the row before it.

Example: A table with 4 total items, 3 per row.

table background=black
td background= white
table

 tr 

  td data /td (white)

  td data /td (white)

  td data /td (white)

 /tr

 tr

  td data /td (white)

  no td (black)

  no td (black)

 /tr

/table
What the user sees in the above example is the top row in white and only the first cell of the second row in white. The remaining cells have no td tag at all and so the table color is rendered.

TO FIX:
includes/classes/boxes.php

Find the line:
$tableBox_string .= '</td>' . "n";

Replace with:
$tableBox_string .= '</td>' . "n";

//hack for netscape 4.x table bgcolor problem

$priorRow = sizeof($contents[$i-1]);

$thisRow = sizeof($contents[$i]);     

while ($thisRow < $priorRow) { 

    $tableBox_string .= '    <td>&nbsp;</td>' . "n"; 

    $thisRow++;

}