2016-07-07 64 views
0

問題: Div newline is hovering div gallery-preview格徘徊其他分區

我試圖讓gallerys預覽和取得DIV與表。 圖庫預覽 div是內聯的,與其他人排成一行。如何使換行 div在底部畫廊預覽 divs行嗎?爲什麼換行徘徊gallery-preview

我的HTML:

 <div class="content"> 
     <h1 class="title">New Photosets</h1> 
     <div class="gallery-preview"> 
      <table> 
       <tr> 
        <td> 
         <img src="image.png" class="gallery-preview-big-image" /> 
        </td> 
       </tr> 
       <tr> 
        <td> 
         <img src="image.png" class="gallery-preview-small-image" /> 
         <img src="image.png" class="gallery-preview-small-image" /> 
         <img src="image.png" class="gallery-preview-small-image" /> 
        </td> 
       </tr> 
      </table> 
     </div> 
     <div class="newline"></div> 

我的CSS:

.newline{ 
    width: 300px; 
    height: 300px; 
    border: 1px solid black; 
} 
/* --------------- */ 
/* Content Gallery */ 

.gallery-preview{ 
    padding-right: 1%; 
    display: inline; 
    float: left; 
} 
.gallery-preview-big-image{ 
    width: 166px; 
    height: 166px; 
    padding-bottom: 10px; 
} 
.gallery-preview-small-image{ 
    width: 50px; 
    height: 50px; 
    padding-right: 4px; 
    display: inline; 
} 

/* --------- */ 

回答

1

這可能是因爲float財產。

嘗試將clear:both;添加到.newline風格中。

0

If this is what you want

比你只需要從去除float:left名爲.gallery預覽

+0

http://image.prntscr.com/image/889f8c9312fb40caaeedb6484109a269.png 他們不是內嵌了。 –