Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

can't get tables to align..


Graveyard666

Recommended Posts

anyone know of a program or some way to help me align tables and cells?

 

My product_info.php page looks retarded..

 

http://www.graveyardrecords.com/2006/produ...roducts_id=1477

 

It looks "okay" in Firefox 1.0.7 and 1.5 but it looks totally messed up in msie 6+

 

not sure what's wrong either. I want the price/availability box to be on the right side where it is but to begin the item description underneath it.

 

here is my code for the tables and maybe something in there is messed up that I can't see...

 

<table width="100%">
<tr class="infoboxcontents" height="20">
		<td class="prodHeading" valign="top"><?php echo $product_info_values['products_name']; ?></td></tr>
</table>
<table width="90%" align="left">
<tr>
	<td class="main"><table border="0" cellspacing="0" cellpadding="2" align="left">
<tr>
<td align="center" class="smallText">
<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_IMAGE, 'pID=' . $product_info_values['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $product_info_values['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"')  . '<br>' .  tep_image(DIR_WS_IMAGES . 'image_enlarge.gif') . '</a>'; ?>
		  </td>
		</tr>
<tr>
<td class="main" align="center"><?php echo TEXT_QUANTITY . tep_draw_input_field('quantity', '1', 'SIZE=2 maxlength=2') . tep_draw_separator('pixel_trans.gif', '5', '1') . tep_draw_hidden_field('products_id', $product_info['products_id']) . '<br>' .  tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'align=absmiddle'); ?>
</td></tr>
<tr>
		<td align="center" class="smalltext">
<?php // ################### Ask a question ############## ?>	
	  <?php echo tep_image(DIR_WS_IMAGES . 'askaquestion.gif', IMAGE_BUTTON_ASK_A_QUESTION); ?>
  <a href="ask_a_question.php?products_id=<?php echo $product_info_values['products_id']; ?>" ONMOUSEOVER="window.status='.<?php echo TEXT_QUESTION; ?> .'; return true"></a>
<?php // ################ end added ask a question ############ ?>
</td></tr>
		<tr>
		<td align="center" class="smalltext">
<?php // ################### Tell A Friend ############## ?>	
	  <?php echo tep_image(DIR_WS_IMAGES . 'emailAFriend.gif', IMAGE_EMAILAFRIEND); ?> <br>
  <a href="tell_a_friend.php?products_id=<?php echo $product_info_values['products_id']; ?>" ONMOUSEOVER="window.status='.<?php echo BOX_TELL_A_FRIEND_TEXT; ?> .'; return true"> </a>
<?php // ################ end Tell A Friend ############ ?>
</td></tr>
		<tr>
		<td align="center" class="smalltext">
<?php // ################### add to Wishlist ############## ?>	
	  <?php echo tep_image(DIR_WS_IMAGES . 'addToWishList.gif', IMAGE_BUTTON_TELL_A_FRIEND); ?> <br>
  <a href="tell_a_friend.php?products_id=<?php echo $product_info_values['products_id']; ?>" ONMOUSEOVER="window.status='.<?php echo BOX_TELL_A_FRIEND_TEXT; ?> .'; return true"> </a>
<?php // ################ end add to Wishlist ############ ?>
</td></tr>
		<tr>
		<td align="center" class="smalltext">
<?php // ################### Print Page ############## ?>	
	  <?php echo tep_image(DIR_WS_IMAGES . 'printPage.gif', IMAGE_BUTTON_TELL_A_FRIEND); ?> <br>
  <a href="tell_a_friend.php?products_id=<?php echo $product_info_values['products_id']; ?>" ONMOUSEOVER="window.status='.<?php echo BOX_TELL_A_FRIEND_TEXT; ?> .'; return true"> </a>
<?php // ################ end Print Page ############ ?>
</td></tr>

<?php
$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
$products_attributes = tep_db_fetch_array($products_attributes_query);
if ($products_attributes['total'] > 0) {
?>
		<tr>
		  <td class="main" colspan="2" align="middle"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
		</tr>
<?php
  $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");
  while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
	$products_options_array = array();
	$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
	while ($products_options = tep_db_fetch_array($products_options_query)) {
	  $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
	  if ($products_options['options_values_price'] != '0') {
		$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
	  }
	}

	if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
	  $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
	} else {
	  $selected_attribute = false;
	}
?>
		<tr>
		  <td class="main" align="middle"><?php echo $products_options_name['products_options_name'] . ':'; ?></td></tr>
<tr>
		  <td class="main" align="middle"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
		</tr>
<?php
  }
?>
<?php
}
?>
</td></tr>
</table>
<table>
<table align="right">
<tr class="headerCart_table" height="20" align="right">
		<td class="prodcontents" align="right" valign="top"><?php echo $products_price; ?></td></tr>
<tr class="headerCart_table" height="20" align="right">
		<td class="statusHeading">Availability: <b><?php echo tep_get_products_status_name($product_info_values['status'], '1', 'false'); ?></b></td></tr></table>
<table>
<tr><class="main">
<?php echo stripslashes($product_info_values['products_description']); ?>
</tr>
</table>

	  </table>


  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>


<?php

if ($product_info_values['products_date_available'] > date('Y-m-d H:i:s')) {
?>
  <tr>
	<td align="center" class="comingHeading"><?php echo sprintf(TEXT_DATE_AVAILABLE, my_date($product_info_values['products_date_available'])); ?></td></tr>
<tr>
<td align="center" class="smallText"><?php echo TEXT_DATE_AVAILABLE2 ?>
</td>
  </tr>
<?php
} else {
?>
  <tr>
	<td align="center" class="bkgText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
  </tr>
<?php
}
?>




<tr><td>
<?php
/* This has been commented out for use with Family Products v3.0
if ((USE_CACHE == 'true') && empty($SID)) {
  echo tep_cache_also_purchased(3600);
} else {
  include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
} */
 }
?>
	</td>
  </tr>
	</td>
  </tr>
			  </td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
 </tr>
</table>
<!-- body_eof //-->

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...