Browsers Targeted: Internet Explorer 5
Normally, if you don’t explicitly set a CSS property in a style sheet or style attribute, querying the style for that property will return an empty value. This is not to say that the property isn’t set, only that it is either a descended property from some other element or it has a default value that the system doesn’t explicitly need to track. However, you will probably encounter situations where you need to know the value of a property (say the position of an element) without having explicitly declared it beforehand.
In Internet Explorer 5.0, you can do this with the currentStyle property. This property exposes the same properties as the standard style property, but it will retrieve the explicit values of the properties even if they haven’t been set elsewhere. Note that you can set CSS properties derived from currentStyle, but the property itself is asynchronous?it will reflect the older value until the screen buffer has had a chance to redraw.