Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Multiple Columns Leave space at top (Div)

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 07-18-2003, 07:00 AM
 
wallachee wallachee is offline
 

Senior Member
  
Join Date: Feb 2003
Posts: 102
 

Default Multiple Columns Leave space at top (Div)

I'm using version 3.3.5, and I recently used the div 2 function to split my products into two columns http://www.powerbookmedic.com/xcart1 The problem I have is that now there is a gap between the top of the table and when the products actually start. I know it is the products.tpl file as when I revert back to the old file, the gap is gone. Would someone please be able to tell me what is wrong in my code. I've tried every combination I can think of editing the first couple of lines, but nothing seems to work. The code is below:

Code:
<table border=0 width=100% cellspacing=0 cellpadding=0<tr> <td> б═ <table border=0 width=100%> б═ {section name=product loop=$products} б═ {if $smarty.section.product.index is div by 2} б═ б═ </tr> <tr valign="top"> б═ {/if} б═ <td valign="top"> б═ б═ <table border=0 width=100%><tr> б═ б═ б═ <td width="20%" align=center valign=top><a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=70 product=$products[product].product} { $lng.lbl_see_details }</a></td> б═ б═ б═ <td valign=top width=100% >{$products[product].product|escape}</font> <font class=TableCenterProductTitleOrange></font><font size=1> {$products[product].descr|truncate:100:"...":true} </font><hr size=1 noshade width=130 align=left> б═ б═ б═ {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} б═ б═ б═ {include file="modules/Subscriptions/subscription_info_inlist.tpl"} б═ б═ б═ {else} б═ б═ б═ {if $products[product].price ne 0} б═ б═ б═ {if $products[product].discount ne 0} б═ б═ б═ <font class=MarketPrice>{$lng.lbl_market_price}: <s>{math equation="(price/(100-discount))*100" price=$products[product].price discount=$products[product].discount format="%d.00" assign=unformatted}{include file="currency.tpl" value=$unformatted}</s> </font> б═ б═ б═ {/if} б═<div align="left"> б═ б═ <font class=TableCenterProductTitleOrange>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].discount ne 0}, save {$products[product].discount}%{/if} б═ б═ б═ {else} б═ б═ б═<div align="left"> <font class=TableCenterProductTitleOrange>{$lng.lbl_enter_your_price}</font> б═ б═ б═ {/if} б═ б═ б═ {/if} б═ б═ б═ </td></tr> б═ б═ </table> б═ </td> б═ {/section} </td></tr></table> </td></tr></table>
Reply With Quote
  #2  
Old 07-18-2003, 11:11 PM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

The space is caused by the </tr> at the top - i presume you are using Netsacpe or other standards compliant browser.

Change the file to:

Code:
<table border=0 width=100% cellspacing=0 cellpadding=0<tr> <td> <table border=0 width=100%> <tr> {section name=product loop=$products} <td valign="top"> <table border=0 width=100%><tr> <td width="20%" align=center valign=top><a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=70 product=$products[product].product} { $lng.lbl_see_details }</a></td> <td valign=top width=100% >{$products[product].product|escape}</font> <font class=TableCenterProductTitleOrange></font><font size=1> {$products[product].descr|truncate:100:"...":true} </font><hr size=1 noshade width=130 align=left> {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].price ne 0} {if $products[product].discount ne 0} <font class=MarketPrice>{$lng.lbl_market_price}: <s>{math equation="(price/(100-discount))*100" price=$products[product].price discount=$products[product].discount format="%d.00" assign=unformatted}{include file="currency.tpl" value=$unformatted}</s> </font> {/if} <div align="left"> <font class=TableCenterProductTitleOrange>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].discount ne 0}, save {$products[product].discount}%{/if} {else} <div align="left"> <font class=TableCenterProductTitleOrange>{$lng.lbl_enter_your_price}</font> {/if} {/if} </td></tr> </table> </td> {if $smarty.section.product.index is odd} </tr> <tr> {/if} {/section} </tr> </table> </td></tr></table>
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 07-19-2003, 07:50 AM
 
wallachee wallachee is offline
 

Senior Member
  
Join Date: Feb 2003
Posts: 102
 

Default

Thanks for the help. Unfortunately the code you provided does the same thing. In every browser, explorer,safari, mozilla the gap is still there. I have a feeling it is a table row too, but I can't figure this thing out.

-Bradley
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:09 AM.

   

 
X-Cart forums © 2001-2020