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 !!

Nonetheless here a tip how I would do it:

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 {
     display: block;
     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/

Reply via email to