Changed width detection method

Using `$(element).width()` to detect the width was causing issues when using css `box-sizing:border-box;`
It would set the inner width of the element, and not the out width like applied in border-box mode.

Changed to `$(element).css('width');` to get around that. Now width is applied via CSS which seems to work for all box-sizing methods.