我似乎无法将div id="navigation"
底部与图像对齐。有人可以帮我处理 CSS 吗?谢谢!
这是HTML代码:
<body>
<div class="container">
<div class="header"><img id="logo" src="images/logo.png" />
<div id="navigation">
<ul>
<li><a href="#">Menu link 1</a></li>
<li><a href="#">Menu link 2</a></li>
<li><a href="#">Menu link 3</a></li>
</ul>
</div>
</div>
<div class="sidebar">Sidebar</div>
<div class="content">Main content</div>
<div class="footer">Footer content</div>
</div>
</body>
和CSS:
.container {
width: 80%;
max-width: 1260px;
min-width: 780px;
background: yellow;
margin: 0 auto;
}
.header {
width: 100%;
float: left;
background: orange;
}
#logo {
float: left;
display: block;
}
#navigation {
margin-left: 50px;
padding: 0px 50px 0px 0px;
float: left;
background: pink;
}
#navigation ul {
list-style-type: none;
}
#navigation li {
display: inline;
}
#navigation a {
float: left;
margin: 0px 80px 0px 0px;
}
.sidebar {
clear: both;
float: left;
width: 20%;
background: red;
}
.content {
float: left;
width: 80%;
}
.footer {
clear: both;
position: relative;
background: green;
}