我使用了一个内部有2个元素的div,我想将我的第一个元素放置在垂直对齐顶部和第二个元素的div底部。该div是我的页面的正确部分,并等于我的主要内容的高度。CSS div里面的定位
#right {
float:right;
width: 19%;
background:#FF3300;
margin-left:2px;
padding-bottom: 100%;
margin-bottom: -100%;
}
#right .top {
display:block;
background-color:#CCCCCC;
}
#right .bottom {
bottom:0px;
display:block;
background-color:#FFCCFF;
height:60px;
}
HTML:
<div id="right">
<span class="top">Top element</span>
<span class="bottom"><img src="images/logo_footer1.gif" width="57" height="57" align="left" class="img"> <img src="images/logo_footer2.gif" width="57" height="57" align="right" class="img"></span>
</div>
我想正确的股利是这样的: alt text http://christianruado.comuf.com/element.png
您可能还想尝试将其检出/发布到http://doctype.com/ – 2010-04-14 08:55:41