2017-06-21 69 views
1

我对此很陌生,所以这可能真的很愚蠢,但这里就是这样。尝试使用表单元格居中对齐

我想垂直对齐一个div到我的页面中间,但它似乎并没有工作。文字总是在左上角加载?

/*======================================= 
 
        HOME 
 
    =======================================*/ 
 

 
#home { 
 
    height: 100%; 
 
} 
 

 
#home-cover { 
 
    height: 100%; 
 
    background-image: url("../img/bg-home.jpg"); 
 
} 
 

 
#home-content-box { 
 
    width: 100%; 
 
    height: 100%; 
 
    display: table; 
 
} 
 

 
#home-content-box-inner { 
 
    display: table-cell; 
 
    vertical-align: middle; 
 
    text-align: center; 
 
} 
 

 
#home-heading h3 { 
 
    color: #fff; 
 
    font-size: 55px; 
 
    font-weight: 700; 
 
    margin; 
 
    20px 0 20px 0; 
 
}
<!-- Home --> 
 
<section id="home"> 
 

 
    <div id="home-cover" class="bg-paralax animated fadeIn"> 
 
    <div id="home-content-box"> 
 
     <div id="home-conent-box-inner"> 
 
     <div id="home-heading" class="animated zoomIn"> 
 
      <h3>Watch Out <br> The Modern Responsive Website! 
 
      </h3> 
 
     </div> 
 
     <div id="home-btn" class="animated zoomIn"> 
 
      <a class="btn btn-lg btn-general btn-white" href="#work" role="button" title="View Our Work">View Our Work</a> 
 
     </div> 
 
     </div> 
 
    </div> 
 
    </div> 
 
</section>

+0

您在HTML拼错'家-content-box-inner'。你拼写'conent',这会解决你的问题吗? –

+0

它碰巧是我们最好的:) – DanielaB67

回答

-2

你第三次DIV类是不正确的 “家庭conent-箱内” “而不是家庭内容的盒子内”

+0

是我是一个白痴,错过了一个“T” –