在将一个元素与另一个元素的底部对齐时,我遇到了绝对和相对定位的问题。我已经设置了http://jsfiddle.net/sitrobotsit/xLahG/8/来说明问题。基本上,底部对齐的元素与其上方的文本重叠。
HTML
<div class="subevents">
<ul id="events_gallery">
<li class="events_column">
<img src="http://placekitten.com/130/100">
<h3>Some heading</h3>
<p>Some vairable length text. Sed ut perspiciatis
unde omnis iste natus error sit voluptatem accusantium.</p>
<p class="bottom"><a href="#">Overlapping link</a></p>
</li>
</ul>
</div>
CSS
#events_gallery li {
border: solid 1px #999;
list-style-type: none;
position: relative;
width: 295px;
}
#events_gallery li p, #events_gallery li h3 {
left: 139px;
}
#events_gallery li img {
float: left;
}
#events_gallery li .bottom {
vertical-align: bottom;
position: absolute;
bottom: 0;
}