Dynamic placing of images inside the div. i used the expression() to calculate the height and width of the image during runtime. but it is not working in the firefox.
My coding is
<style type="text/css">
html>body div img { /*hidden from IE 5-6 */
margin-top: 0; /* to clean up, just in case MS later supports valign! */
vertical-align: middle;
}
.coverImg {border:1px solid #ccc; width:321px;height:199px; font-size: 1em;margin-bottom:10px; margin-left:10px;}
.coverImg img{margin-top: expression(( 199 - this.height ) / 2); margin-left:expression(( 321 - this.width ) / 2);}
.invitationImgs {border:1px solid #ccc; width:120px;height:92px; font-size: 1em; float:right; vertical-align:middle; margin:0px 15px 13px 0px;}
.invitationImgs img{ margin-top: expression(( 92 - this.height ) / 2);}
</style>
Can anybody help me?
Thanks in advance


Reply With Quote
Bookmarks