Jump to content

text move to right border and why is it up 2 mm from left text


avu

Recommended Posts

Why dos the <strong>300.00 ฿</strong> not go to the right border and why is it up 2 mm from the rest of the line text?

 

this it the HTML output

 

<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;"> 
<tr style="float:left;"> <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; ">
<td><a href="http://xxxx.com/product_info.php?products_id=29{1}2"><img src="images/185.jpg" alt="Round Ball 18.5 cm (100 balls)" title=" Round Ball 18.5 cm (100 balls) " width="40" height="25" /></a></td>
<td><span class="tdbLink"><button id="tdb7" type="submit">Update</button></span><script type="text/javascript">$("#tdb7").button({icons:{primary:"ui-icon-refresh"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script>
<input type="text" name="cart_quantity[]" value="1" size="2" /><input type="hidden" name="products_id[]" value="29{1}2" /> 02 Orange Yellow <a href="http://xxxx.com/product_info.php?products_id=29{1}2">
<strong>Round Ball 18.5 cm (100 balls)</strong></a></li>  <li style="float:right;width:0%;}" style="list-style: none; padding-left: 0px; margin: 0px; "><strong>300.00 ฿</strong> </td></li> </tr></table></td> </tr>

<tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;">
<tr style="float:left;"> <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; ">
<td><a href="http://xxxx.com/product_info.php?products_id=29{1}3"><img src="images/185.jpg" alt="Round Ball 18.5 cm (100 balls)" title=" Round Ball 18.5 cm (100 balls) " width="40" height="25" /></a></td> 
<td><span class="tdbLink"><button id="tdb8" type="submit">Update</button></span><script type="text/javascript">$("#tdb8").button({icons:{primary:"ui-icon-refresh"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script>
<input type="text" name="cart_quantity[]" value="2" size="2" /><input type="hidden" name="products_id[]" value="29{1}3" /> 03 Orange <a href="http://xxxx.com/product_info.php?products_id=29{1}3">
<strong>Round Ball 18.5 cm (100 balls)</strong></a></li>  <li style="float:right;width:0%;}" style="list-style: none; padding-left: 0px; margin: 0px; "><strong>300.00 ฿</strong> </td></li> </tr></table></td> </tr>

<tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;"> 
<tr style="float:left;"> <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; ">
<td><a href="http://xxxx.com/product_info.php?products_id=29{1}4"><img src="images/185.jpg" alt="Round Ball 18.5 cm (100 balls)" title=" Round Ball 18.5 cm (100 balls) " width="40" height="25" /></a></td>
<td><span class="tdbLink"><button id="tdb9" type="submit">Update</button></span><script type="text/javascript">$("#tdb9").button({icons:{primary:"ui-icon-refresh"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script>
<input type="text" name="cart_quantity[]" value="3" size="2" /><input type="hidden" name="products_id[]" value="29{1}4" /> 04 Parstel Pink <a href="http://xxxx.com/product_info.php?products_id=29{1}4">
<strong>Round Ball 18.5 cm (100 balls)</strong></a></li>  <li style="float:right;width:0%;}" style="list-style: none; padding-left: 0px; margin: 0px; "><strong>300.00 ฿</strong> </td></li> </tr></table></td> </tr>

<tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;"> 
<tr style="float:left;"> <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; ">
<td><a href="http://xxxx.com/product_info.php?products_id=30"><img src="images/185.jpg" alt="20 CM Ball" title=" 20 CM Ball " width="40" height="25" /></a></td> 
<td><span class="tdbLink"><button id="tdb10" type="submit">Update</button></span><script type="text/javascript">$("#tdb10").button({icons:{primary:"ui-icon-refresh"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLink");</script>
<input type="text" name="cart_quantity[]" value="1" size="2" /><input type="hidden" name="products_id[]" value="30" /> </td></li> </tr></table></td> </tr>
</table>

 

 

This is the code

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<?php

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
      echo '      <tr>';

      $products_name = '<table border="0" width="100%" cellspacing="0" cellpadding="0" style="border:0px;padding:0.5px;margin:0px;">' .
                       '  <tr style="float:left;">' .
                       '    <li class="left" style="list-style: none; padding-left: 0px; margin: 0px; "><td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' .
                       '    <td>' . tep_draw_button(IMAGE_BUTTON_UPDATE, 'refresh') . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="2"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']);
				   

      if (STOCK_CHECK == 'true') {
        $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']);
        if (tep_not_null($stock_check)) {
          $any_out_of_stock = 1;

          $products_name .= $stock_check;
        }
      }

      if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) {
        reset($products[$i]['attributes']);
        while (list($option, $value) = each($products[$i]['attributes'])) {
          $products_name .= ' ' . '' . $products[$i][$option]['products_options_values_name'] . ' ';          
  $products_name .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><strong>' . $products[$i]['name'] . '</strong></a></li>' . '  ' .
          '<li style="float:right;width:0%;}" style="list-style: none; padding-left: 0px; margin: 0px; "><strong>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong>';

        }
      }


      $products_name .= '    </td></li>' .
                        '  </tr>' .
                        '</table>';

      echo '        <td valign="top">' . $products_name . '</td>' .
   
           '      </tr>';
    }
?>

    </table>

 

also product without attribute missing this code.

So I need to make an if no attribute than this code

$products_name .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><strong>' . $products[$i]['name'] . '</strong></a></li>' . '  ' .          '<li class="right" style="list-style: none; padding-left: 0px;
margin: 0px; "><strong>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</strong>';

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.