【发布时间】:2014-04-19 09:00:44
【问题描述】:
我有一个标题,它是导航和徽标的父级。我已将父级设置为溢出:隐藏,因此我能够将 margin-top 添加到导航以使其位于底部。但是,它也会剪辑徽标 div。我正在尝试关注这个问题...Overriding overflow: hidden
因此尝试将徽标设置为溢出:可见,但这也不起作用。除了徽标不在父容器中之外,我不确定其他任何解决方案。
这是我的代码
CSS:
.container {
width: 960px;
margin:0 auto;
background-color: blue;
}
header {
height: 100px;
background-color: #001D5D;
position: relative;
overflow: hidden;
}
#logo {
height:100px;
width:100px;
z-index:10;
top:0px;
position: absolute;
overflow: visible;
}
nav {
background-color:#1CCEAE;
margin-top:63px;
}
nav ul {
width:100%;
line-height: 37px;
text-align:right;
background-color:#1CCEAE;
}
ul li {
display: inline-block;
margin-right: 20px;
}
ul li a {
text-decoration: none;
font-size: 1em;
color:white;
}
这是一个小提琴 http://jsfiddle.net/XS3Zs/
【问题讨论】:
标签: html css overflow parent-child