added try/catch
get width from computedStyle if it is not available.