2014-10-03 128 views
0

正在使用bootstrap.min.css我得到两个事业部原因不明的空间

之间listed with box

不明原因的空间,我用下面的代码来删除空白,但简化版,作品 div + div {margin-top:0px;}

如何删除空白

<section id="service" style="background-color:#009999;"> 
    <div class="container"> 
    </div> 
</section> 
    <!-------------white space appear here------------> 
<section id="contact" style="background-color:#009999;"> 
    <div class="container"> 
    </div> 
</section> 

enter image description here

+0

您不能使用div + div,因为它们位于不同的元素内http://www.w3.org/TR/CSS21/selector.html#adjacent-selectors – monkeyinsight 2014-10-03 04:46:08

+1

您可能需要用你的css代码设置一个(jsfiddle)例子,并完成给你的麻烦区域的html。 PS。希望这两个部分在您的代码中没有相同的“ID” – greener 2014-10-03 04:48:43

+0

@greener我对这两个部分标记都有不同的ID – 2014-10-03 05:03:19

回答

1
.box { 
padding: 50px 30px; 
background: #fff; 
border-bottom: 1px solid #e9e9e9; 
position: relative; 
} 

删除此行border-bottom: 1px solid #e9e9e9;