这块模板是商城显示一行一列的商品,怎么改为一行显示两列或四列的方式,我是初手谢谢
<div class="content-div">
<!-- {if $category > 0} -->
<form name="compareForm" action="compare.php" method="post" onSubmit="return compareGoods(this);">
<!-- {/if} -->
<!--{foreach from=$goods_list item=goods}-->
<table border="0" cellpadding="5" cellspacing="1" class="goods-list">
<tr>
<td width="35%" align="center"><!-- {if $category > 0} -->
<input name="goods[]" type="checkbox" id="goods[]" value="{$goods.goods_id}" style="vertical-align: middle" />
<!-- {/if} -->
<a href="{$goods.url}"><img src="{$goods.goods_thumb}" alt="{$goods.goods_name}" border="0" style="vertical-align: middle" /></a></td>
<td><a href="{$goods.url}"><strong>{$goods.goods_name}</strong></a><br />
{$goods.goods_brief}<br />
<!-- {if $show_etprice} -->
{$lang.et_price}<span class="et-price">{$goods.et_price}</span>
<!-- {/if} -->
<!--{if $goods.promote_price neq "" } -->
{$lang.promote_price}<span class="goods-price">{$goods.promote_price}</span>
<!--{else}-->
{$lang.shop_price}<span class="goods-price">{$goods.shop_price}</span>
<!--{/if}-->
<div class="addto_cart"><a href="javascript:collect({$goods.goods_id});"><img src="../images/collect.gif" alt="{$lang.collect}" width="69" height="19" /></a> <a href="javascript:addToCart({$goods.goods_id})"><img src="../images/add_cart.gif" alt="{$lang.add_to_cart}" width="80" height="19" /></a></div></td>
</tr>
</table>
<!--{/foreach}-->
<div align="center">
<!-- {if $category > 0} -->
<input name="compareButton" type="submit" value="{$lang.button_compare}" />
<!-- {/if} -->
</div>
<!-- {if $category > 0} -->
</form>
<!-- {/if} -->
</div>
<div class="content-div">
<!-- {if $category > 0} -->
<form name="compareForm" action="compare.php" method="post" onSubmit="return compareGoods(this);">
<!-- {/if} -->
<!--{foreach from=$goods_list item=goods}-->
<table border="0" cellpadding="5" cellspacing="1" class="goods-list">
<tr>
<td width="35%" align="center"><!-- {if $category > 0} -->
<input name="goods[]" type="checkbox" id="goods[]" value="{$goods.goods_id}" style="vertical-align: middle" />
<!-- {/if} -->
<a href="{$goods.url}"><img src="{$goods.goods_thumb}" alt="{$goods.goods_name}" border="0" style="vertical-align: middle" /></a></td>
<td><a href="{$goods.url}"><strong>{$goods.goods_name}</strong></a><br />
{$goods.goods_brief}<br />
<!-- {if $show_etprice} -->
{$lang.et_price}<span class="et-price">{$goods.et_price}</span>
<!-- {/if} -->
<!--{if $goods.promote_price neq "" } -->
{$lang.promote_price}<span class="goods-price">{$goods.promote_price}</span>
<!--{else}-->
{$lang.shop_price}<span class="goods-price">{$goods.shop_price}</span>
<!--{/if}-->
<div class="addto_cart"><a href="javascript:collect({$goods.goods_id});"><img src="../images/collect.gif" alt="{$lang.collect}" width="69" height="19" /></a> <a href="javascript:addToCart({$goods.goods_id})"><img src="../images/add_cart.gif" alt="{$lang.add_to_cart}" width="80" height="19" /></a></div></td>
</tr>
</table>
<!--{/foreach}-->
<div align="center">
<!-- {if $category > 0} -->
<input name="compareButton" type="submit" value="{$lang.button_compare}" />
<!-- {/if} -->
</div>
<!-- {if $category > 0} -->
</form>
<!-- {/if} -->
</div>
解决方案 »
- 缓存一般用在什么地方,比如网站的哪个板块,举个例子
- 关于Smarty,动态函数数组循环的问题
- 怎么取得这一块
- jpgraph的问题: 很奇怪,同样的程序在windows上可以显示中文,在linux上就不行了,怎么回事?
- php和javascript怎样互相传递参数?能不能给出个简单的例子,在线等
- 请教各位高手~!!!
- 求救:smarty 如何循环显示图片
- 这个SQL语句怎样??
- 一个很弱的问题,怎样让按钮变灰?
- PHP-Eclipse调试时为什么显示无法找到该网页?已配置 WAMP
- 像开发www.91fangzhi.cn这样的网站如果用PHP 合适吗?
- discuz安装好后出现{/if}是为什么
你看着该呗
<td> 不明白你想要做什么。