Try this method that uses ComputedStyle. I couldn't be bothered to optimize it with deferred binding so it does some runtime checks.
static public native String getComputedStyleProperty(Element el, String property) /*-{
if (window['getComputedStyle']) { // W3C DOM method
if (property === 'float')
property = 'cssFloat';
var value = el.style[property], computed;
if (!value) {
computed = el['ownerDocument']['defaultView']['getComputedStyle'](el, null);
if (computed) { // test computed before touching for safari
value = computed[property];
}
}
return value;
} else if (el['currentStyle']) {
var value;
switch(property) {
case 'opacity' :// IE opacity uses filter
value = 100;
try { // will error if no DXImageTransform
value = el.filters['DXImageTransform.Microsoft.Alpha'].opacity;
} catch(e) {
try { // make sure its in the document
value = el.filters('alpha').opacity;
} catch(err) {
}
}
return value / 100;
case 'float': // fix reserved word
property = 'styleFloat'; // fall through
default:
value = el['currentStyle'] ? el['currentStyle'][property] : null;
return ( el.style[property] || value );
}
}
return "";
}-*/;