duanhu7390 2014-07-22 10:25
浏览 8

如何编辑悬停特色项目列表?

I need a small help, in the above page, when I hover over the featured product, the size of the element covers the heading "Latest", which is right below the Featured row. I have tried to fix that, but it doesn't seem to work.

Can you suggest how it can be done? I would also, like to decrease the size of the area occupied by a single product (not the product image size, but the margins and paddings around it). Can it be done?

Please help me through. Thanks

Code for Featured TPL File

<?php
    $option = $this->config->get('featured_module');
    if($option && is_array($option)) {
        $option = array_shift($option);
    }
?>
<div class="box">
  <div class="box-heading"><span><?php echo $heading_title; ?></span></div>
  <div class="box-content">
    <div class="box-product product-grid">
      <?php foreach ($products as $product) { ?>
      <div>
        <?php if ($product['thumb']) { ?>
        <div class="image"><a href="<?php echo $product['href']; ?>" style="<?php echo ($option['image_height'] < 224) ? 'line-height: 224px' : ''; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
        <?php } else { ?>
        <div class="image">
            <span class="no-image" style="<?php echo ($option['image_width'] < 224) ? 'width: 224px' : 'width: '.$option['image_width'].'px'; ?>; <?php echo ($option['image_height'] < 224) ? 'line-height: 224px' : 'line-height: '.$option['image_height'].'px;'; ?>">
            <img src="image/no_image.jpg" alt="<?php echo $product['name']; ?>" /></span>
        </div>
        <?php } ?>
        <?php if ($product['price']) { ?>
        <div class="price-label">
          <?php if (!$product['special']) { ?>
          <div><span class="price-fixed"><?php echo $product['price']; ?></span></div>
          <?php } else { ?>
          <div class="special-price"><span class="price-fixed"><?php echo $product['special']; ?></span><span class="price-old"><?php echo $product['price']; ?></span></div>
          <?php } ?>
        </div>
        <?php } ?>
        <div class="name" style="width: <?php echo $option['image_width']; ?>px"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
        <?php if ($product['rating']) { ?>
        <div class="rating"><img src="catalog/view/theme/acceptus/image/icons/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php } ?>
        <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <div><span class="price-fixed"><?php echo $product['price']; ?></span></div>
          <?php } else { ?>
          <div class="special-price"><span class="price-fixed"><?php echo $product['special']; ?></span><span class="price-old"><?php echo $product['price']; ?></span></div>
          <?php } ?>
        </div>
        <?php } ?>
        <div class="details">
        <div class="cart"><a onclick="addToCart('<?php echo $product['product_id']; ?>');"><span><?php echo $button_cart; ?></span></a></div>
        <div class="wishlist"><a onclick="addToWishList('<?php echo $product['product_id']; ?>');"><span>Add to Wish List</span></a></div>
        <div class="compare"><a onclick="addToCompare('<?php echo $product['product_id']; ?>');"><span>Add to Compare</span></a></div>
        </div>
      </div>
      <?php } ?>
    </div>
  </div>
</div>
  • 写回答

1条回答 默认 最新

  • doushuzd3033 2014-07-22 10:41
    关注

    I think this will solve your problem. Give the "latest" box a style="margin-top: 70px;", as in-line or give a new class and give the style.

    评论

报告相同问题?

悬赏问题

  • ¥20 测距传感器数据手册i2c
  • ¥15 RPA正常跑,cmd输入cookies跑不出来
  • ¥15 求帮我调试一下freefem代码
  • ¥15 matlab代码解决,怎么运行
  • ¥15 R语言Rstudio突然无法启动
  • ¥15 关于#matlab#的问题:提取2个图像的变量作为另外一个图像像元的移动量,计算新的位置创建新的图像并提取第二个图像的变量到新的图像
  • ¥15 改算法,照着压缩包里边,参考其他代码封装的格式 写到main函数里
  • ¥15 用windows做服务的同志有吗
  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法