两个div之间的空间高度

时间:2014-04-25 09:04:22

标签: css

我的代码可以在文本中嵌入视频。但是标题和视频之间的空间 太高了。

<section id="Number"> 
 <article class="container">
 <div class="row">
    <div class="span12">
        <div class="sub_header"> 
        <h2>ABC Number</h2> 

以下视频将从ABC编号中过高,只有一行(但该行似乎太高)

        <div class="video">
        <div class="vdwrapper">
        <div class="fluidvids" style="width:100%;position:relative;padding-top:56.2%">
        <iframe src="https://player.vimeo.com/video/87745355?                     
         title=0&amp;byline=0&amp;portrait=0" width="100%" height="100%" 
         frameborder="0" style="position:absolute;top:-0.85px;left:0"></iframe>
         </div>
         </div>
         </div>




      <div class="featurecont"> <p> Number is a proxy phone number assigned to you when 
you sign up on with your regular mobile number.</p>
       <p>Number can be used in many ways, you can register your Number as a separate   
profile on can keep your real phone number entirely anonymous. You can share your 
Number with lesser known people or acquaintances that you meet at various places, or 
while posting Ads. This way, people can only reach you on and cannot call you on your 
personal mobile number.

</p>

 <p>Another cool advantage of Number is that your Number can also be transferred to   
 non-SIM devices like , etc. This would allow your kids and family members to stay    
 connected with you and have safe and secure communications.</p></div>  
 </div>
 </div>
  </div>        

css如下:

.chaatzvideo {
position: relative;
padding-top: 50px;
padding-bottom: 50px;
background: url('../images/tv.png') center center no-repeat;
background-size: 78%;
}

.row {
margin-left: -20px;
*zoom: 1;
}

.span12 {
width: 980px;
}

.vdwrapper {
margin: 0 auto;
text-align: center;
width: 75%;
}

.container,
.navbar-static-top .container,
.navbar-fixed-top .container,
.navbar-fixed-bottom .container {
width: 980px;
}

#Number .sub_header h2{background: url('../images/features/Chaatz-Notop.png') no-repeat    
center top; padding-bottom: 50px; padding-top:110px}

1 个答案:

答案 0 :(得分:1)

你正在填充顶部和底部的#34; #Number .sub_header h2&#34; ...尝试使用这样的东西

#Number .sub_header h2 {
    background: url('../images/features/Chaatz-Notop.png') no-repeat center top;
    padding-bottom: 20px;
    padding-top:20px
}

<强> DEMO