我得到了一个如下的html结构,
<div id="page-wrap">
<header>
<div id="logo">
</div>
<nav>
<ul>
<li><a href="">text 1</a><li>
<li><a href="">text 2</a></li>
<li><a href="">text 3</a></li>
</ul>
</nav>
</heder>
<div id="main-content">
<h1>Some Heading</h1>
<p>Some Text</p>
<div>A div</div>
</div> <!-- end of main-content -->
</div> <!-- end of page-wrap -->
用CSS
#page-wrap {
max-width:850px;
top:0;
bottom:0;
height:100%;
margin: 0 auto;
}
header {
padding: 80px 0px 0px 0px ;
position: relative;
}
#logo {
position: absolute;
left:0;
width:123px;
height:122px;
background:transparent url(../images/logo.png) no-repeat;
}
header nav {
position: absolute;
right:0;
}
header nav ul {
}
header nav ul li {
display:inline;
list-style: none;
}
如上.. main-content div与标题重叠>.<请建议propper css来获取main-content与标题底部的距离为80px ..(标题上有一个高度为122px的徽标)