很简单的页面。想要使用 inline-display 而不是 float。现在设置了几次,但是,由于某种原因,在此页面上,当我设置徽标 div 的高度时,它会下拉菜单 div。
HTML
<div id="topbar">
<div class="item" id="logo"></div>
<div class="item" id="menu">Menu</div>
</div>
CSS
#topbar {
width: 100%;
max-width: 1000px;
margin: auto;
}
#topbar .item {
line-height: 91px;
display: inline-block;
background-color: #063;
}
#topbar #logo {
background-image: url(../img/logo.png);
background-repeat: no-repeat;
width: 30%;
height: 91px;
}
#topbar #menu {
width: 60%;
}
从我这边可能是简单的解决方案或简单的错误,但看不到它。