Fix when the CSS style width/height has percentage

When the style has a percentage width() or height returns NaN.
With the computedStyle function instead of css ensures that return pixels.