0
由于某些原因,我无法弄清楚如何让我的searchContainer
显示在#logo
的右侧,并使其填充top-header
的剩余空间。将浮动div旁边的元素对齐并填充剩余空间
任何人都可以帮我吗?我知道我很亲密。这是一个jsfiddle。
HTML
<div id="top-header" class="slide">
<div id="cornerBox"> </div>
<a id="logo" href="/"> </a>
<div id="searchBar"> </div>
</div>
CSS
#cornerBox {
float:left;
width:50px;
height:50px;
background-color:#3CC274;
}
#top-header {
position:absolute;
height: 56px;
width:100%;
min-width:595px;
max-height: 50px;
background-color:#24BD66;
color:#fff;
z-index:3;
box-shadow: 0 0 4px rgba(0, 0, 0, .14), 0 4px 8px rgba(0, 0, 0, .23);
}
#logo {
display:block;
text-decoration:none;
float:left;
width:100px;
margin:10px 0 0 15px;
border:1px solid black;
height:30px;
}
#searchBar {
border-radius:3px;
height:35px;
margin-top:7px;
background-color:#5ECD8C;
}
谢谢,我不知道我必须添加保证金。 – bryan