我有以下代码:http: //jsfiddle.net/kXesZ/。2 个社交媒体图标需要位于背景图像的底部边缘,但我无法将它们内联。我尝试了几件事(display:block-inline、float:left/right assignment 等),但他们所做的只是四处移动。
我在看什么?
HTML
<div class="footer">
<div class="left">
<h3>Title</h3>
<p>
Lorem ipsum
</p>
</div>
<div class="right">
<h3>Title</h3>
<p>Title</p>
<p>
<b>Telephone:</b> 012345678<br/>
<b>E-mail:</b> abc@abc.com
<p>
<div class="social">
<a href="http://facebook.com" title="" id="facebook">Facebook</a>
<a href="http://twitter.com" title="" id="twitter">Twitter</a>
</div>
</div>
CSS
body { font:14px Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif; color:#282828; text-align:left; }
.footer { background:url('http://i.imgur.com/AhHgSJr.jpg') no-repeat; padding:5px; width:984px; height:268px; }
.footer .left { display:block; width:252px; float:left; padding:98px 0 0 40px; }
.footer .right { display:block; width:252px; float:right; padding:98px 40px 0 0; }
.footer h3 { color:#a0cf67; font-size:21px; font-weight:bold; }
.footer p { padding:0 0 26px 0; }
.footer .social #facebook { background:url('http://i.imgur.com/g20ltEP.png') no-repeat; float:left; display:block; width:59; height:55px; overflow:hidden; text-indent:100%; white-space:nowrap; }
.footer .social #twitter { background:url(http://i.imgur.com/xteWM7e.png) no-repeat; display:block; width:58px; height:45px; overflow:hidden; text-indent:100%; white-space:nowrap; }
.footer-container .bottom-container { text-align:center; }