内联块使图像更小的问题?

时间:2013-11-20 18:01:35

标签: php wordpress row css

我正试图在这个页面上将这三个图像一个接一个地加载。当我在css中将其设置为“Inline-Block”时,它可以工作,但图像变得非常小。

https://www.palmersdeliandmarket.com/holiday/

这是我的CSS:

.categories ul li a.current { font-weight: bold; }
#shopp .category { position: relative; display: inline-block;}
#shopp .views { display: inline; position: absolute; right: 0; top: 0; }
#shopp .views button { border: 1px solid transparent; background: none; cursor: pointer;          padding: 2px; margin-bottom: -3px; }
#shopp .views button.hover { background-color: #ebebeb; border: 1px solid #777; }
#shopp .views li { display: inline; }
#shopp .orderby { float: right; }

和我的HTML:

<?php if(shopp('category','hasproducts','load=coverimages')): ?>
<div class="alignright"><?php shopp('category','pagination','show=10'); ?></div>
<ul class="products">
    <li class="row"><ul>
    <?php while(shopp('category','products')): ?>
    <?php if(shopp('category','row')): ?></ul></li><li class="row"><ul><?php endif; ?>
        <li class="product">
            <div class="frame">
            <a href="<?php shopp('product','url'); ?>"><?php shopp('product','coverimage','setting=gallery-previews'); ?></a>
                <div class="details">
                <h4 class="name"><a href="<?php shopp('product','url'); ?>"><?php shopp('product','name'); ?></a></h4>
                <p class="price"><?php shopp('product','saleprice','starting=from'); ?> </p>
                <?php if (shopp('product','has-savings')): ?>
                    <p class="savings">Save <?php shopp('product','savings','show=percent'); ?></p>
                <?php endif; ?>

                    <div class="listview">
                    <p><?php shopp('product','summary'); ?></p>
                    <form action="<?php shopp('cart','url'); ?>" method="post" class="shopp product">
                    <?php shopp('product','addtocart'); ?>
                    </form>
                    </div>
                </div>

            </div>
        </li>
    <?php endwhile; ?>
    </ul></li>
   </ul>

   <div class="alignright"><?php shopp('category','pagination','show=10'); ?></div>

</div>
    <?php else: ?>
  <?php if (!shopp('catalog','is-landing')): ?>
  <?php shopp('catalog','breadcrumb'); ?>
  <h3><?php shopp('category','name'); ?></h3>
  <p>No products were found.</p>
  <?php endif; ?>
    <?php endif; ?>

谢谢,感谢任何帮助。

1 个答案:

答案 0 :(得分:0)

display: inline-block + width: auto的宽度仅足以容纳内容。添加width: 100%