角js partials不会留在原地

时间:2015-02-24 14:00:18

标签: html css angularjs

您好我的index.html中有3个部分

<!--header view-->
 <div id="header" ng-include="'partials/header.html'"></div>

<!--main page view-->
   <div ui-view class=""></div>



<!-- Loading the Footer -->
  <div id="oilFooter" ng-include="'partials/footer.html'"></div>
</html>
</body>

标题目前与下面的主视图重叠。

看起来像这样:

enter image description here

我希望它看起来像这样:

enter image description here

这是header.html的css

header {
position: absolute;
top:0px;
 margin: 0 auto;
margin-bottom:10px;
width:100%;
height:85px;
z-index:300;
background-color:#000000;
 font-family: 'Open Sans', sans-serif; color:#c4c4c4; font-size:16.0px; line-height:1.19em;

用于html的CSS

/* general settings */
html {
 min-height:100%;
  overflow-x:hidden;
  overflow-y:scroll;
  position:relative;
  width:100%;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom:0px;
   /* background-color:#1c1c1c;*/
    background-color:#cecece;


}

感谢。

2 个答案:

答案 0 :(得分:0)

不是一个真正的答案,但它似乎是一个CSS问题。添加此

*{
  background: #000 !important;
  color: #0f0 !important;
  outline: solid #f00 1px !important;
}

并检查你是否有任何偏离边界的元素。

答案 1 :(得分:0)

我将标题定位从绝对更改为相对。