所以,我得到了以前的帮助,但是我的东西没有组织,所以我很难理解某人在做什么。它让我离开这里,我有我的垂直路线,但现在因为某种原因,我的页脚中途切断了,我的社交图标保持在我的动力旁边,即使他们想要对齐/漂移到右侧。垂直对齐页脚内容
HTML
<div id="footer">
<div id="footerContent">
<div id="leftFooter">
$POWERED_BY$
</div>
<div id="rightFooter">
<a href="#"><img src="http://zevoxa.com/images/social/facebook.png" /></a>
<a href="#"><img src="http://zevoxa.com/images/social/twitter.png" /></a>
<a href="#"><img src="http://zevoxa.com/images/social/youtube.png" /></a>
<a href="#"><img src="http://zevoxa.com/images/social/deviantart.png" /></a>
</div>
</div>
</div>
CSS
#footer {
background-image:url('/images/footer_bg.png');
bottom repeat-x;
height: 110px;
display:table-cell;
vertical-align: middle;
}
#footerContent {
display:table;
width:100%;
}
#leftFooter {
float: left;
font-family:maven;
font-size: 15px;
padding-left: 20px;
}
#rightFooter {
float: right;
text-align:right;
}
如果我没必要#footerContent,然后在那里我可能会放宽度:继承;高度:继承;? – Zevoxa
对不起,我的意思是你可能只需要#footerContent或#footer。你可以在一个div上设置宽度,高度,显示,背景属性,但正如我所说,这是可选的,取决于你想要做什么。无论哪种方式都很好。我用第二个例子更新了小提琴,以便说清楚。 –