How about setting object.style.width instead? That should even work at all times, because you don't actually set the property, but only the style string which will be used to calculate the width. I haven't tried it though.