我正在尝试在 div 标签内插入一个 div 标签,其中孩子居中并位于底部。(我尝试了 Stack Overflow 的几种解决方案,但均未成功)。使用以下 css 和 html 示例,我遇到了问题
body{
margin:0;
font-family:Georgia,Times,serif !important;
font-size:12pt;
background:white;
}
#header{
height: 60px;
width: 100%;
border: 1px solid black;
}
#navWrap{
background:white;
bottom: 0;
font-size: 12pt;
height: 40px;
border: 1px solid black;
margin: 0px auto;
width: 960px;
}
#contentWrapper{
width:960px;
padding: 0;
margin:15px auto 10px auto;
}
#content{
padding: 20px 10px 10px 10px;
height:100%;
background:#fff;
border: 1px solid black;
}
#footer {
width:100%;
height:260px;
margin:0 auto;
padding: 20px 10px 10px 10px;
border: 1px solid black;
bottom:0;
}
#copyright{
width:100%;
height:60px;
bottom:0;
margin: 0 auto;
border: 1px solid black;
}
<body>
<div id="header">
<div id="navWrap">
This is navigation box.
</div>
</div>
<div id="contentWrapper">
<div id="content">
This is a container
</div>
</div>
<div id="footer">
This is a footer.
</div>
<div id="copyright">
This is a copyright.
</div>
</body>
我想要底部标题位置内的导航(navWrap)。我怎样才能做到这一点?