2016-04-25 92 views
0

我在两个div之间出现了无法解释的间隙。两个div之间出现无法解释的间隙

这里的情况的图像:

enter image description here

这仅仅是红色div,我要飞过的差距。

我希望红色divred一直到图像所在的位置。我怎样才能做到这一点?

代码:

<script type="text/html" id="product-template"> 
    <div class="col-sm-6 col-lg-2 clickable" style="margin-top:20px; padding: 25px;"> 
     <div style="border-radius: 10px; border: 1px solid white;height: 270px;overflow: hidden;"> 
      <div style= "height: 200px; border: 1px solid white; 
         border-top-left-radius: 10px; 
         border-top-right-radius: 10px; 
         color: white; 
         background: center no-repeat; 
         background-image: url(../../the_vegan_repository/product_images/alpro_custard.jpg); 
         background-size:cover;"> 
      </div> 
      <div style="height: 70px; background: red;"> 
       <h6 data-bind="text: product.name" style="color: white"></h6> 
       <h6 data-bind="text: shop.name" style="color: white"></h6> 
       <h6 data-bind="text: shop.suburb" style="color: white"></h6> 
      </div> 
     </div> 
    </div> 
</script> 
+0

你可以做出的jsfiddle?帮助你会更容易。 – QoP

+0

我宣布巫术。 – Gendarme

回答

2

你有h6有你的底div的孩子,在“默认”引导的标题从h1h6margin-top:10pxmargin-bottom:10px因此您需要重置在marginh6

喜欢的东西:

h6 { 
    margin-top:0 
}