幅 1387 ピクセルの連絡先バー (.png) と、それをオーバーレイする連絡先情報 (電子メール、twr、fb) を含む 4 つの同一の div があります。これは次のようになります。
質問: 連絡先の div を等間隔に配置し、ウィンドウ サイズに関係なく背景画像に固定するにはどうすればよいですか?
構造:
<div id="footer">
<div id="contact-row">
<div class="contact">
<a class="email" href="mailto:#">email</a>
<a class="tw" href="http://twitter.com/#" target="_blank"></a>
<a class="fb" href="http://www.facebook.com/pages/#" target="_blank"></a>
</div>
...+ 3 more divs with class of "contact"
</div>
</div>
スタイル:
#footer {
width: 100%;
height: 178px;
background: url('../img/contact-bg.png') no-repeat center;
position: relative;
clear: both;
}
#contact-row {
width: 100%;
height: 178px;
border: solid 1px #aaa;
text-align: center;
overflow: hidden;
margin: 0 auto 0 auto;
}
.contact {
width: 150px;
height: 25px;
border: solid 1px #ccc;
display: inline-block;
margin: 0 50px;
}
私はさまざまな解決策を試しましたが、背景画像に縛られたり、小さなブラウザー ウィンドウに適応したりするものはありません。作業コピーはここにあります: aaargb!!!
私はいくつかの新鮮な目をいただければ幸いです。ありがとうございました!