Tables and spacing, spacing when embedding a table within a table |
Tables and spacing, spacing when embedding a table within a table |
JGar |
Dec 22 2009, 08:33 AM
Post
#1
|
Group: Members Posts: 3 Joined: 22-October 09 Member No.: 10,106 |
Hi,
I have code which inserts a table within a table. The inner table has some blank space above and below it in the cell, which I want to get rid of. Please look at the attached picture. The grid like table with 6 pictures is inserted in the bigger table. It has empty space above and below the table, which I don't want. Please advise how to change the code to remove this space. The code looks like this: <table id="product-info-table" border="1" bordercolor="#5A1200" height="400" width="600" cellspacing="0" cellpadding="0"> <tbody> <tr> <td colspan="2"> <?php print theme('imagecache', 'collection_view', $node->field_collection_image[0]['filename'], '', ''); ?> </td> </tr> <tr> <td> <table height="200" width="300" border="1" bordercolor="#5A1200" cellspacing="0" cellpadding="0" style="background:#ffffff"> <?php $products = array(); foreach($node->taxonomy as $termObj) { $nodes = taxonomy_select_nodes(array('5'), 'or', 0, FALSE, 'n.sticky DESC, n.created DESC'); $count = 0; while (($data = db_fetch_array($nodes)) && ($count < 6)) { $n = node_load($data['nid']); if ($n->type == 'product_info') { $count = $count + 1; $products[$count] = $n; } } } if ($count == '6') { print '<tr>'; print '<td>'; print theme('imagecache', 'product_teaser', $products[1]->field_picture[0]['filename'], '', ''); print '</td>'; print '<td>'; print theme('imagecache', 'product_teaser', $products[2]->field_picture[0]['filename'], '', ''); print '</td>'; print '<td>'; print theme('imagecache', 'product_teaser', $products[3]->field_picture[0]['filename'], '', ''); print '</td>'; print '</tr>'; print '<tr>'; print '<td>'; print theme('imagecache', 'product_teaser', $products[4]->field_picture[0]['filename'], '', ''); print '</td>'; print '<td>'; print theme('imagecache', 'product_teaser', $products[5]->field_picture[0]['filename'], '', ''); print '</td>'; print '<td>'; print theme('imagecache', 'product_teaser', $products[6]->field_picture[0]['filename'], '', ''); print '</td>'; print '</tr>'; } ?> </table> </td> <td> <div margin="5" height="200" width="300" style="background:#BCBEC0;"> <?php print $node->field_description[0]['view']; ?> </div> </td> </tr> </tbody> </table> |
Lo-Fi Version | Time is now: 23rd April 2024 - 05:52 PM |