Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with tables please


mark27uk3

Recommended Posts

Hi Guys,

 

I am hoping that a html wiz will read this post and point out where I am going wrong.

 

If you take a look here you will see that there is a grey background to the product 'Nokia BL-6C Battery'. What I am trying to do is extend that grey background over the image so it looks complete.

 

This is the code

 

if (!tep_star_product_with_attributes($star_products['products_id'])) {
 $star_products["0"] = array('align' => 'left',
         'params' => 'width="100%" valign="top"',
                                     'text' => '<tr>
              <td height="10%" width="100%" align="left" colspan="4" class="star-product-title">' . $star_products['products_name'] . '</td>
        
    	 <td align="right"  height="100%" width="15%" rowspan="4"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>
      </tr>
<tr>
        <td height="5%" width="85%" align="left" class="star-product-price">' . TEXT_OUR_PRICE . ' '.
$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>
        
      </tr>
      <tr>
        <td height="80%" width="85%" class="star-product">'. $star_products["products_description"] . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '"><p>' . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a>  <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a></p></td>
      </tr>
      
');

 

I am totally at a loss with it, I have tried everything I know.

 

Hope someone can help.

 

Mark

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Well, my head hurts from all those rowspans and colspans, but fundamentally, if I understand what you want, the gray bar needs to be in its own <tr>. The way you have it now, the graphic is in a column to the right of the bar.

Link to comment
Share on other sites

You put it in its own tr, sure, but one that's embedded in the existing td with colspan="4".

 

You've got a lot of table nesting going on, and have some odd stuff such as a tr with a width attribute that is meaningless. I don't have time to straighten it all out for you, but I think you want the header bar in its own row that is the full table width. A second row has two columns, one for the text and one for the image and buttons.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...