2013-02-28 117 views
0

我是zencart新手,学习基础知识。我已经安装了一个名为'pre_green'的主题。主题正常,但产品尺寸非常小。我检查了抓住产品的div,但无法找到与宽度有关的任何东西。当我检查source-code时,我看到一个style="width:33%;被自动添加到divs。我想这是因为我的产品尺寸很小。在Zencart中增加产品宽度CSS

<div class="centerBoxWrapper" id="featuredProducts"> 
    <h2 class="centerBoxHeading">Our Products</h2> 
     <div class="centerBoxContentsFeatured centeredContent back" style="width:33%;"> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_3&amp;products_id=7"> 
<img src="images/chili.gif" alt="Chilli" title=" Chilli " width="100" height="67" /></a> 
<br /> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_3&amp;products_id=7">Chilli</a><br />Rs.0</div> 
     <div class="centerBoxContentsFeatured centeredContent back" style="width:33%;"> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_2&amp;products_id=3"> 
<img src="images/melon.jpg" alt="Melon" title=" Melon " width="100" height="70" /> 
</a> 
<br /> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_2&amp;products_id=3">Melon</a> 
<br />Rs.0</div> 
     <div class="centerBoxContentsFeatured centeredContent back" style="width:33%;"> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_2&amp;products_id=4"> 
<img src="images/orange.jpg" alt="Orange" title=" Orange " width="100" height="70" /> 
</a> 
<br /> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_2&amp;products_id=4">Orange</a> 
<br />Rs.0</div> 
    <br class="clearBoth" /> 

     <div class="centerBoxContentsFeatured centeredContent back" style="width:33%;"> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_3&amp;products_id=9"> 
<img src="images/potato.jpg" alt="Potato" title=" Potato " width="80" height="80" /></a> 
<br /> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_3&amp;products_id=9">Potato</a> 
<br />Rs.50</div> 
     <div class="centerBoxContentsFeatured centeredContent back" style="width:33%;"> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_3&amp;products_id=11"> 
<img src="images/tomato.jpg" alt="Tomato" title=" Tomato " width="80" height="80" /> 
</a> 
<br /> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_3&amp;products_id=11">Tomato</a> 
<br />Rs.60</div> 
     <div class="centerBoxContentsFeatured centeredContent back" style="width:33%;"> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_2&amp;products_id=2"> 
<img src="images/banana.jpg" alt="Banana" title=" Banana " width="100" height="70" /> 
</a> 
<br /> 
<a href="http://localhost/zencart/index.php?main_page=product_info&amp;cPath=1_2&amp;products_id=2">Banana</a><br />Rs.30</div> 
    <br class="clearBoth" /> 

所以我想知道如何增加尺寸或修改百分比。提前致谢。

+0

你是如何安装模板的?有什么方法可以自己编辑文件吗? – GordonsBeard 2013-02-28 07:10:51

+0

我已经从管理面板安装。是的,我可以编辑这些文件 – AssamGuy 2013-02-28 07:22:36

回答

0

我认为应该有选择你有多少产品在一行中显示

它会自动增加宽度

如果不是你必须改变它的一些CSS或PHP文件的选项 如果你不知道的一些编码

做这个实验之前进行单独那将是危险的

0

你提到基于您联系您选择的设置的HO计算33%您想要显示这些内容框。你显然已经把它设置为显示3列。 您发布的代码为id =“featuredProducts”,因此表示您指的是您的特色产品内容框,因此控制列数的设置位于Admin-> Configuration-> Index Listing- >特色产品每行的列数。

但是,你开始问如何改变你的图像的大小,似乎怪他们是小的33%。但33%不是原因。

图像根据您在管理 - >配置 - >图像中指定的尺寸来确定尺寸。例如“图像 - 特色产品宽度”设置。默认情况下,设置为100.根据您的意愿改变它和相应的高度设置。请记住,该数字只影响HTML通知浏览器显示图像的内容。如果您上传较小的图片,它们将被拉伸到这些尺寸。如果您上传的图像非常大,它们将缩小显示,但仍然必须下载整个图像,因此不要上传比您打算使用的图像大的图像,否则会降低访问者的体验。 如果您还想支持客户可以根据需要请求更大的图像,只需根据相应的命名方案上传额外的图像,并在适当的地方自动使用。 Zen Cart支持网站www.zen-cart.com上的常见问题解答库为您持续的学习效益提供了所有这些主题。