2016-11-10 24 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%,非常感謝你。 –