【发布时间】:2016-06-28 16:37:44
【问题描述】:
有一个包装器。 然后是标题 10%; 然后 部分: 最小高度:80%; 高度自动;
screenshot ---> This is overlapping going under header 当我滚动时,内容位于标题下方。 我想让事情停在那里... Screenshot---> This is normal
#wrapper{
position:absolute;
padding-top:50px;
height:100%;
width:100%;
top:150px;
left:0;
margin:0;
border:2px soild green;/**/
}
header {
position:fixed;
top:0;
left:0;
background-color:#2e72ce;
float:top;
color:black;
text-align:center;
margin:0;
opacity:0.4;
padding:0px;
overflow-x:hidden;
width:100%;
height:calc(10% - 9px);
z-index:9999;
clear:both;
}
#main_section {
position:relative;
top:-50px; /*-5px proper location */
float:left;
padding-top:0;
padding-left:60px;
width:95%;
bottom:0;
right:0;
min-height:80%;
height:auto;
border:2px solid red;/**/
}
<html><!----HTML FIle---->
<body >
<div id="wrapper">
<header>
<img src="img/ztlogo.png" height="50px"/>
</header>
<section id="main_section">
【问题讨论】:
标签: php html css stylesheet