我也很难让这个工作,出于某种奇怪的原因,DIV 确实水平对齐正确,但第二个 div 最终在第一个下面。任何帮助将不胜感激。
HTML:
<footer>
<div class="inner">
<section id="footer-copyright" class="clear left">
<ul>
<li>© 2013
<a href="/">Company</a>
|
<a href="sitemap.html">Sitemap</a>
|
<a href="privacy.html">Privacy Policy</a>
</li>
</ul>
</section>
<section class="footer-box clear right">
<ul>
<li>Design by <a href="/" target="new">Template</a></li>
</ul>
</section>
</div>
</footer>
CSS:
footer .inner {
padding-top: 50px;
}
#footer-copyright {
display: block;
padding-top: 35px;
width:50%;
}
#footer-box {
display: block;
padding-top: 35px;
}
footer ul {
color: #FFFFFF;
list-style: none outside none;
padding: 10px 0;
}
.inner {
margin: 0 auto;
position: relative;
width: 1000px;
}
.clear {
clear: both;
display: block;
}
.right, .alignright {
float: right;
}
.left {
float:left;
}
也许我只需要一双新的眼睛...... :)
您可以在此处查看工作链接