2017-04-08 10 views
1

如何使我的文档和视频在我的引导程序标题jumbotron下水平对齐?我只是希望内容与其正下方的标题一致。如何在我的标题下对齐我的div?

CSS

.container2 { 
     display: flex; 
     flex-flow: row nowrap; /* Align on the same line */ 
     justify-content: space-between; /* Equal margin between the child elements */ 
     } 

HTML

<div class="container2"> 
     <div class="left"> 
      <p style=" margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;"></p> 
      <iframe class="scribd_iframe_embed" src="https://www.scribd.com/embeds/344420651/content?start_page=1&view_mode=scroll&access_key=key-8enfvS2L2K0nh24zmVG8&show_recommendations=true" data-auto-height="false" data-aspect-ratio="0.7729220222793488" scrolling="no" id="doc_97914" width="400" height="400" frameborder="0"></iframe> 
     </div> 
     <div class="center"> 
      <p style=" margin: 12px auto 6px auto; font-family: Helvetica,Arial,Sans-serif; font-style: normal; font-variant: normal; font-weight: normal; font-size: 14px; line-height: normal; font-size-adjust: none; font-stretch: normal; -x-system-font: none; display: block;"></p> 
      <iframe class="scribd_iframe_embed" src="https://www.scribd.com/embeds/344420651/content?start_page=1&view_mode=scroll&access_key=key-8enfvS2L2K0nh24zmVG8&show_recommendations=true" data-auto-height="false" data-aspect-ratio="0.7729220222793488" scrolling="no" id="doc_97914" width="400" height="400" frameborder="0"></iframe> 
     </div> 
     <div class="right"> 
      <iframe width="560" height="315" src="https://www.youtube.com/embed/6O7VlTCPYVU" frameborder="0" allowfullscreen></iframe> 
     </div> 
     </div> 

全部站点代码 - https://jsfiddle.net/1mx7ygr1/

我知道,我使用的是引导和使用编码的页面和网页的其它方式没有完全响应。然而,试图获得基本的点,并获得基本的理解,而不是像我刚刚开始时那样发展我的技能。

+0

是视频和文件在您的片断在同一行未对齐还是我失去了一些东西?它们不在你的导航栏标题下吗? – repzero

+0

更新后,我正在寻找文件和视频与标题对齐。 –

+1

垂直,还是水平?直接在对方下面?在右边?你仍然有点模糊。 –

回答

0

.left.center div中有一个不必要的段落标记。这些段落是空的。他们也在增加空间。

其更改为display:none或删除(如果你想)

.left p,.center p{ 
    display:none !important; 
} 

fiddle is here

+0

请重新阅读我的答案....我说如果必要删除元素。我不能说p标签是否在稍后时间里放置了什么东西。 – repzero

+0

p标签是块元素,不管它们是否为空它们将增加空间....这是什么导致文档div下移..自私是你看到的东西工作,仍然投票下来 – repzero

+0

你还没有看到在我的答案中的一个片段 – repzero