0

HTML:

<div class="product">
  <a href="#" class="thumb"><img src="img/thumb_md.png" alt="" /></a>
</div>

CSS:

.product .thumb {           
  position: relative;
  display: table-cell;
  vertical-align: bottom;
  height: 130px;
}

..在现代浏览器中效果很好,当然,IE 除外!

有什么解决方法吗?我尝试的另一个解决方案是 position:absolute; 底部:0;但它干扰了上面 z-index 似乎没有任何影响的下拉菜单。

谢谢!

4

1 回答 1

1

是的,请改用相对+绝对定位。其准系统是:

a.thumb { display: block; position: relative; height: 130px; }
a.thumb img { display: block; position: absolute; bottom: 0; }

请参阅相对定位中的绝对定位

于 2009-09-27T08:25:11.640 回答