Truppe Steven schrieb:
> The problem is that i need to center it vertical and horizontal. And i
> haven't found a crossbrowser way of doing that.
> The $(window).load works fine !!
My first email doesn't get trough and there was an error of mine anyway...:
Here's how I would do centering which degrades much better withouth
JavaScript:
Standards CSS, supported by all modern browsers:
div.image {
display: table-cell;
width: 400px;
height: 400px;
vertical-align: middle;
text-align: center;
}
IE extra CSS (dynamic property):
div.image img {
margin-top: expression(this.offsetHeight <
this.parentNode.offsetHeight ? parseInt((this.parentNode.offsetHeight -
this.offsetHeight) / 2) + 'px' : '0');
}
That way everything stays in the style sheet (where it belongs in my
opinion). I'm not a big friend of presentational JavaScript...
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/