2016-11-10 63 views
0

我试图添加一行到我的分支缩略图的底部,但我似乎无法得到它的权利,也没有找到一个工作的答案。我如何把一行放在缩略图引导的底部

<div class="item col-lg-4"> 
     <div class="thumbnail"> 
      <div class="caption"> 
       <h4 class="list-group-item-heading"><?php echo $row["name"]; ?></h4> 
       <p class="list-group-item-text"><img style="width: 100%; padding-bottom: 10px;" border="0" src="<?php echo $row["description"]; ?>"></p> 
       <div class="row"> 
        <div class="col-md-6 "> 
         <p class="lead"><?php echo '€'.$row["price"].' EURO'; ?></p> 
        </div> 
        <div class="col-md-6 "> 
         <a class="btn btn-success" href="cartAction.php?    action=addToCart&id=<?php echo $row["id"]; ?>">Add to cart</a> 
        </div> 
       </div> 
      </div> 
     </div> 
    </div> 

最有可能的,如果你把它放在一个正常的代码它不会退还任何东西。因为它从sql数据库获取信息。但它回馈如下:

|================|       |================| 
| picture  |       | picture  | 
|    |       |    | 
|  -  |       |  -  | 
|    | but i want it to be like. |    | 
| price, button |       |    | 
|    |       |    | 
|    |       |    | 
|    |       |    | 
|    |       | price, button | 
|================|       |================| 

问题是。在该行中添加额外的类并将其添加到底部,或者只是bottom: 0px;不起作用。

大的形式是Thumbnail,价格和按钮是连续的。所以你知道这种形式可能是有用的信息。

对不好的英语,不是我的母语。 真的很抱歉,如果这个答案很明显,但我是新手引导。

+0

请看一看引导粘页脚https://getbootstrap.com/examples/sticky-footer/ – ummahusla

回答

1

这可能是你所需要的:

.thumbnail { 
    position: relative; 
    height: 300px; /* Replace with your desired thumbs height */ 
} 

.row-bottom { 
    position: absolute; 
    bottom: 0; 
    width: 100%; 
} 

检查this example

+0

生病测试和让你知道电源关闭atm我在移动,所以后来测试它 –

+0

YEP这totaly固定它100%,非常感谢你。 –