2014-12-05 92 views
0

嗨我有一個我正在處理的頁面,它從數據庫中獲取文章。使用php分割結果,每頁顯示6篇文章。我遇到的問題是,如果有七個結果,並且我們進入第2頁,那麼在時間菜單按鈕下可以看到一切都很好。當結果不超過1頁時,MYSQL結果顯示錯誤

如果不到6篇文章和只有一頁,第一篇文章變得有趣,並且文本在圖像下方下降,如在私人航空按鈕下可以看到的那樣。

的鏈接網址爲:http://goo.gl/N8p8CT

兩個項目似乎是article.row.mid內,所以我很努力工作的原因。

+0

正如我看到它發生,因爲第一篇文章有​​ Banzay 2014-12-05 06:45:16

+0

謝謝,我沒有注意到,但我已經改變它,沒有什麼不同 – sam003 2014-12-05 08:39:08

+0

謝謝,如果你添加它作爲答案,我會選擇它 – sam003 2014-12-05 09:08:04

回答

0

原因第一篇文章已將圖片包裝成<a></a>標籤,但第二篇文章沒有,這兩張圖片是由不同的css規則渲染的。 enter image description here and enter image description here 第一個樣式是由botstrap.css規則設計的,2 -nd是您自己的樣式表。 無論如何,如果您使用引導,那麼最好將文章的圖像轉換爲div以便使用引導網格更好地對齊。 我會這樣做:

<article class="row mid"> 
<div class="col-xs-4"> 
<a href="https://www.flyvictor.com/?utm_source=display&amp;utm_medium=leaderbanner&amp;utm_campaign=tempus20141010" target="_blank"> 
         <img src="admin/images/private_jet_hanger-1413201025.jpg" alt="post1" height="250px" width="250px"> 
         </a> 
</div> 
<div class="col-xs-8 info"><a href="https://www.flyvictor.com/?utm_source=display&amp;utm_medium=leaderbanner&amp;utm_campaign=tempus20141010" target="_blank"> 
          </a><h1><a href="https://www.flyvictor.com/?utm_source=display&amp;utm_medium=leaderbanner&amp;utm_campaign=tempus20141010" target="_blank"></a><a href="article.php?id=111&amp;tag1=private_aviation">Jet Partner launches empty leg service...</a></h1> 
          <p class="details"></p> 
          <p class="tags"></p> 
          <p class="text"> 
           </p><p>The advantages associated with private jet travel are invaluable: the ability to journey in comfort, security and privacy; to arrive at the airport just 15 minutes before take-off and to completely avoid check-in. Now, the advent of groundbreaking       </p> 
          <a href="article.php?id=111" class="btn btn-default" "="">Read More</a>       <ul class="counters list-inline"> 

          </ul> 

         </div> 
        </article>