views:

135

answers:

1

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;
}

..works great in modern browser, except, ofcourse, IE!

Is there any workaround? The other solution I tried was position:absolute; bottom:0; but it interferes with the drop-down above where z-index doesn't seem to have any effect.

Thanks!

+1  A: 

Yes, use relative+absolute positioning instead. The barebones of that is:

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

See Absolute Positioning Inside Relative Positioning.

cletus
Tried that already, but like I said I don't want to use position:absolute; bottom:0; because it interferes with the drop-down above it where z-index doesn't seem to have any effect. Drop-down hides below these images.
Nimbuz
Since only IE8 (running as IE8 and not in compatbility mode) is the only version of IE that supports display: table-cell. And if z-index is a concern, explicitly set it.
cletus