2013-02-28 15 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上的常見問題解答庫爲您持續的學習效益提供了所有這些主題。